|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.crowd.client.PlaceControllerDelegate
com.threerings.parlor.game.client.GameControllerDelegate
com.threerings.parlor.turn.client.TurnGameControllerDelegate
public class TurnGameControllerDelegate
Performs the client-side processing for a turn-based game. Games which
wish to make use of these services must construct a delegate and call
out to it at the appropriate times (see the method documentation for
which methods should be called when). The game's controller must also
implement the TurnGameController interface so that it can be
notified when turn-based game events take place.
| Field Summary | |
|---|---|
protected CrowdContext |
_ctx
A reference to our client context. |
protected GameObject |
_gameObj
A reference to our game object. |
protected TurnGameController |
_tgctrl
The turn game controller for whom we are delegating. |
protected String |
_thfield
The name of the turn holder field. |
protected TurnGameObject |
_turnGame
A casted reference to our game object as a turn game. |
| Fields inherited from class com.threerings.crowd.client.PlaceControllerDelegate |
|---|
_controller |
| Constructor Summary | |
|---|---|
TurnGameControllerDelegate(TurnGameController tgctrl)
Constructs a delegate which will call back to the supplied TurnGameController implementation wen turn-based game related
things happen. |
|
| Method Summary | |
|---|---|
void |
attributeChanged(AttributeChangedEvent event)
|
void |
didLeavePlace(PlaceObject plobj)
|
int |
getTurnHolderIndex()
Returns the index of the current turn holder as configured in the game object. |
void |
init(CrowdContext ctx,
PlaceConfig config)
|
boolean |
isOurTurn()
Returns true if the game is in progress and it is our turn; false otherwise. |
void |
willEnterPlace(PlaceObject plobj)
|
| Methods inherited from class com.threerings.parlor.game.client.GameControllerDelegate |
|---|
gameDidEnd, gameDidStart, gameWasCancelled, gameWillReset |
| Methods inherited from class com.threerings.crowd.client.PlaceControllerDelegate |
|---|
handleAction, mayLeavePlace |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected TurnGameController _tgctrl
protected CrowdContext _ctx
protected GameObject _gameObj
protected TurnGameObject _turnGame
protected String _thfield
| Constructor Detail |
|---|
public TurnGameControllerDelegate(TurnGameController tgctrl)
TurnGameController implementation wen turn-based game related
things happen.
| Method Detail |
|---|
public boolean isOurTurn()
public int getTurnHolderIndex()
public void init(CrowdContext ctx,
PlaceConfig config)
init in class PlaceControllerDelegatepublic void willEnterPlace(PlaceObject plobj)
willEnterPlace in class PlaceControllerDelegatepublic void didLeavePlace(PlaceObject plobj)
didLeavePlace in class PlaceControllerDelegatepublic void attributeChanged(AttributeChangedEvent event)
attributeChanged in interface AttributeChangeListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||