|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.event.MapPlayerAdapter
Adapter class you can use if you're only interested in a specific type of MapPlayerEvent (entered, moved, left). You can have your class extend this class and override the appropriate method. If your class already extends some other class, you can create a helper class that extends MapPlayerAdapter, and have its methods call methods in your main class.
Constructor Summary | |
MapPlayerAdapter()
|
Method Summary | |
void |
playerEntered(MapPlayerEvent event)
Player entered the map. |
void |
playerEvent(MapPlayerEvent event)
Notification that a MapPlayerEvent has occurred. |
void |
playerLeft(MapPlayerEvent event)
Player left the map. |
void |
playerMoved(MapPlayerEvent event)
Player moved in the map. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MapPlayerAdapter()
Method Detail |
public void playerEvent(MapPlayerEvent event)
There's no need for you to override this method - if you do, you'll get called for every type of MapPlayerEvent, which defeats the purpose of using an adapter. You'd be better off just implementing MapPlayerListener.
playerEvent
in interface MapPlayerListener
public void playerEntered(MapPlayerEvent event)
event
- the MapPlayerEventpublic void playerLeft(MapPlayerEvent event)
event
- the MapPlayerEventpublic void playerMoved(MapPlayerEvent event)
event
- the MapPlayerEvent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |