public interface TurnGameManager
TurnGameManagerDelegate
which will perform the basic turn game processing and call back to the
main manager via this interface.
The basic flow of a turn-based game is as follows:
GameManager.gameWillStart()
GameManager.gameDidStart()
TurnGameManagerDelegate.setFirstTurnHolder()
TurnGameManagerDelegate.startTurn()
TurnGameManager.turnWillStart()
TurnGameManagerDelegate.endTurn()
TurnGameManager.turnDidEnd()
TurnGameManagerDelegate.setNextTurnHolder()
TurnGameManagerDelegate.startTurn()
...
GameManager.endGame()
| Modifier and Type | Method and Description |
|---|---|
int |
getPlayerCount()
Extending
GameManager should automatically handle
implementing this method. |
int |
getPlayerIndex(com.threerings.util.Name username)
Extending
GameManager should automatically handle
implementing this method. |
com.threerings.util.Name |
getPlayerName(int index)
Extending
GameManager should automatically handle
implementing this method. |
boolean |
isActivePlayer(int pidx)
Extending
GameManager should automatically handle
implementing this method. |
void |
turnDidEnd()
Called when the turn was ended.
|
void |
turnDidStart()
Called when we have started the next turn.
|
void |
turnWillStart()
Called when we are about to start the next turn.
|
com.threerings.util.Name getPlayerName(int index)
GameManager should automatically handle
implementing this method.int getPlayerIndex(com.threerings.util.Name username)
GameManager should automatically handle
implementing this method.int getPlayerCount()
GameManager should automatically handle
implementing this method.boolean isActivePlayer(int pidx)
GameManager should automatically handle
implementing this method.void turnWillStart()
void turnDidStart()
void turnDidEnd()
Copyright © 2015. All rights reserved.