Пример #1
0
 void Awake()
 {
     curState               = PlayerGameStates.WaitingNextTurn;
     mayRollDice            = false;
     diceLockedThisTurn     = 0;
     lastDiceLockedThisTurn = 0;
     myPlayer               = GetComponent <PlayerBoard>();
 }
Пример #2
0
    //	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;
        }
    }
Пример #3
0
 void Awake()
 {
     curState = PlayerGameStates.WaitingNextTurn;
     mayRollDice = false;
     diceLockedThisTurn = 0;
     lastDiceLockedThisTurn = 0;
     myPlayer = GetComponent<PlayerBoard>();
 }
Пример #4
0
 //    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;
     }
 }