Example #1
0
 private void OnEnable()
 {
     if (Global.GAMESTATEFSM != null && GameStateFSM.GetGameState().type == GameState.State_Type.BUILD && UnitManager.units != null)
     {
         DisplayUnitsForCurrentPlayer();
     }
 }
 protected void Update()
 {
     if (GameStateFSM.GetGameState().type != GameState.State_Type.LOAD)
     {
         OnUpdate();
     }
 }
Example #3
0
 private void OnEnable()
 {
     if (Global.GAMESTATEFSM != null && GameStateFSM.GetGameState().type == GameState.State_Type.TURN)
     {
         DisplayAbilitiesForCurrentUnit();
     }
 }
Example #4
0
 // Update is called once per frame
 private void Update()
 {
     if (text != null)
     {
         text.text = "Round" + BaseGame.round_number;
     }
     if (GameStateFSM.GetGameState().type == GameState.State_Type.TURN)
     {
         button.interactable = true;
     }
     else
     {
         button.interactable = false;
     }
 }
 private void Update()
 {
     if (GameStateFSM.GetGameState().type != GameState.State_Type.BUILD)
     {
         button.interactable = false;
     }
     else if (PlayerManager.GetCurrentPlayer().money < Unit.GetCost(type))
     {
         button.interactable = false;
     }
     else
     {
         button.interactable = true;
     }
 }
Example #6
0
 // Update is called once per frame
 private void Update()
 {
     if (text != null)
     {
         text.text = GameStateFSM.GetGameState().type.ToString();
     }
     if (PlayerManager.CurrentPlayer == Player.Type.PLAYER1)
     {
         image.color = new Color(1, 0.5f, 1);
     }
     else if (PlayerManager.CurrentPlayer == Player.Type.PLAYER2)
     {
         image.color = new Color(1, 0.75f, 0.4f);
     }
     else
     {
         image.color = Color.white;
     }
 }
 protected GameState.State_Type GetGameState()
 {
     return(GameStateFSM.GetGameState().type);
 }