|
|||||||||
| 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.puzzle.client.PuzzleControllerDelegate
public class PuzzleControllerDelegate
A base class for puzzle controller delegates. Provides access to some delegated puzzle
controller methods (startAction(), clearAction(), etc.) and provides a casted
reference to the puzzle object.
| Field Summary | |
|---|---|
protected PuzzleController |
_ctrl
Our puzzle controller. |
protected PuzzleObject |
_puzobj
The puzzle distributed object. |
| Fields inherited from class com.threerings.crowd.client.PlaceControllerDelegate |
|---|
_controller |
| Fields inherited from interface com.threerings.puzzle.data.PuzzleCodes |
|---|
DEBUG_PUZZLE, DEFAULT_DIFFICULTY, PUZZLE_MESSAGE_BUNDLE |
| Fields inherited from interface com.threerings.presents.data.InvocationCodes |
|---|
ACCESS_DENIED, E_ACCESS_DENIED, E_INTERNAL_ERROR, GLOBAL_GROUP, INTERNAL_ERROR |
| Constructor Summary | |
|---|---|
PuzzleControllerDelegate(PuzzleController ctrl)
Constructs a puzzle controller delegate. |
|
| Method Summary | |
|---|---|
protected boolean |
canClearAction()
Delegates that wish to postpone action clearing can override this method to return false until such time as the action can be cleared. |
protected boolean |
canStartChatting()
Can we start chatting at the instant that this method is called? |
protected void |
clearAction()
Puzzles should override this method and clear out any action on the board and generally clean up anything that was going on because the game was in play. |
void |
didLeavePlace(PlaceObject plobj)
|
protected void |
maybeClearAction()
Calls PuzzleController.maybeClearAction(), preserving its protected access but making
the method available to all PuzzleControllerDelegate derivations. |
void |
playerKnockedOut(int pidx)
Called when a player is knocked out of the game. |
void |
setBoard(Board board)
Called when the puzzle controller sets up a new board for the player. |
void |
setChatting(boolean chatting)
Called when the user toggles chatting mode. |
protected void |
startAction()
Derived classes should override this method and do whatever is necessary to start up the action for their puzzle. |
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, init, mayLeavePlace |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected PuzzleController _ctrl
protected PuzzleObject _puzobj
| Constructor Detail |
|---|
public PuzzleControllerDelegate(PuzzleController ctrl)
| Method Detail |
|---|
public void willEnterPlace(PlaceObject plobj)
willEnterPlace in class PlaceControllerDelegatepublic void didLeavePlace(PlaceObject plobj)
didLeavePlace in class PlaceControllerDelegatepublic void playerKnockedOut(int pidx)
public void setChatting(boolean chatting)
protected boolean canStartChatting()
protected void startAction()
protected boolean canClearAction()
maybeClearAction() when conditions become such that they would once again allow
action to be cleared.
protected void maybeClearAction()
PuzzleController.maybeClearAction(), preserving its protected access but making
the method available to all PuzzleControllerDelegate derivations.
protected void clearAction()
startAction().
public void setBoard(Board board)
board - the newly initialized and ready-to-go board.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||