com.threerings.parlor.game.server
Class GameWatcher<T extends GameObject>
java.lang.Object
com.threerings.parlor.game.server.GameWatcher<T>
- All Implemented Interfaces:
- AttributeChangeListener, ChangeListener
public abstract class GameWatcher<T extends GameObject>
- extends Object
- implements AttributeChangeListener
An abstract convenience class used server-side to keep an eye on a game and perform a one-time
game-over activity when the game ends. Classes that care to make use of the game watcher should
create an instance with their newly created GameObject and implement
gameDidEnd(T).
|
Field Summary |
protected T |
_gameobj
The game object we're observing. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_gameobj
protected T extends GameObject _gameobj
- The game object we're observing.
GameWatcher
public GameWatcher()
init
public void init(PlaceManager plmgr)
init
public void init(T gameobj)
attributeChanged
public void attributeChanged(AttributeChangedEvent event)
- Specified by:
attributeChanged in interface AttributeChangeListener
gameDidEnd
protected abstract void gameDidEnd(T gameobj)
- Called when the game ends to give derived classes a chance to engage in their game-over
antics.