Example #1
0
    void Awake()
    {
        gsm = new GameStateMachine();

        gsm.Add(GameState.Roaming, new RoamingState());
        gsm.Add(GameState.Combat, new CombatState());

        gsm.Change(GameState.Roaming);
    }
Example #2
0
 internal void ChangeState(GameState newState)
 {
     State.Change(State.Current, newState);
 }
Example #3
0
 private void InitiateCombat()
 {
     inCombat = true;
     // Change State machine to combat
     gsm.Change(GameState.Combat);
 }