Turn Phase

Hello what im trying to do is make a turn base strategy game. It will play out kinda like a chessboard, where you move, attack and stuff like that. I want there to be 2 phases. the main phase and the attack phase. the main phase is where you can buy items, equip weapons, and stuff like that. the attack phase is where you move your character and attack the enemys. how would i create a button that would change each phase? thanks in advance!

this button it not a code line. event not a some method. it’s a complex of implementation things:

  • a global (rather public static) variable that stores a current state
  • a simple button that changes this state
  • very many checks in each script that should dependent on this state like

pseudocode

if (GUI.Button("shop") && Global.CurrentState == States.EquipPhase)