예제 #1
0
파일: Player.cs 프로젝트: ktrieu/CatanUnity
 public void Idle_Update()
 {
     if (isMyTurn)
     {
         if (Coordinator.GameState.State == GameStates.Setup)
         {
             ChangeState(PlayerStates.PlacingSettlement);
         }
         else
         {
             if (Input.GetKeyDown(KeyCode.P))
             {
                 ChangeState(PlayerStates.PlacingSettlement);
                 placingUnitType = UnitTypes.Settlement;
             }
             else if (Input.GetKeyDown(KeyCode.C))
             {
                 ChangeState(PlayerStates.PlacingCity);
                 placingUnitType = UnitTypes.City;
             }
             else if (Input.GetKeyDown(KeyCode.R))
             {
                 ChangeState(PlayerStates.PlacingRoad);
             }
             else if (Input.GetKeyDown(KeyCode.N))
             {
                 Debug.Log(string.Format("Ending turn for {0}", Color.ToString()));
                 Coordinator.NextTurn();
             }
         }
     }
 }