Example #1
0
 // Update is called once per frame
 void Update()
 {
     if (m_active)
     {
         if (m_playerState == PlayerState.RollDice)
         {
             //Debug.Log("Roll Dice");
             m_userInterfaceManager.ShowRollDiceButton();
             m_playerState = PlayerState.WaitingForDiceValue;
         }
         else if (m_playerState == PlayerState.SelectTile && m_diceRollValue > 0)
         {
             //Debug.Log("Select tile");
             m_userInterfaceManager.HideRollDiceButton();
             m_playerMovement.Steps = m_diceRollValue;
             m_playerState          = PlayerState.Move;
             m_diceRollValue        = 0;
         }
         else if (m_playerState == PlayerState.Move)
         {
             //Debug.Log("Move");
             m_playerMovement.CanMove = true;
             m_playerState            = PlayerState.Moveing;
         }
         else if (m_playerState == PlayerState.TurnTile)
         {
             //Debug.Log("TurnTile");
             m_playerState = PlayerState.WaitingForBuyTransaction;
         }
         else if (m_playerState == PlayerState.WaitingForBuyTransaction)
         {
             //Debug.Log("Buy transaction");
         }
         else if (m_playerState == PlayerState.Done)
         {
             //Debug.Log("Done");
             m_playerState = PlayerState.NotActive;
             m_userInterfaceManager.HideBuyButton();
             m_userInterfaceManager.HideRollDiceButton();
             OnPlayerDone();
         }
     }
 }