void Awake() { curState = PlayerGameStates.WaitingNextTurn; mayRollDice = false; diceLockedThisTurn = 0; lastDiceLockedThisTurn = 0; myPlayer = GetComponent <PlayerBoard>(); }
// set some stuff up when we enter these states public void SetState(PlayerGameStates newState) { lastState = curState; curState = newState; switch (curState) { case PlayerGameStates.InitTurn: InitTurn(); SetState(PlayerGameStates.ReadyToRollDice); break; case PlayerGameStates.ReadyToRollDice: mayRollDice = true; mayPurchaseTile = false; break; case PlayerGameStates.DiceHaveBeenRolled: InitRoll(); break; case PlayerGameStates.WaitingForLock: mayRollDice = false; mayPurchaseTile = true; break; case PlayerGameStates.WaitingForPurchaseTile: mayRollDice = false; break; case PlayerGameStates.TilePurchaseChosen: mayRollDice = false; mayPurchaseTile = false; break; case PlayerGameStates.WaitingNextTurn: mayRollDice = false; mayPurchaseTile = false; break; } }
void Awake() { curState = PlayerGameStates.WaitingNextTurn; mayRollDice = false; diceLockedThisTurn = 0; lastDiceLockedThisTurn = 0; myPlayer = GetComponent<PlayerBoard>(); }