private void Awake() { instance = this; fsm = new GameFSM(); fsm.Initialize(this); fsm.AddState(GameStateType.Play, new PlayState()); fsm.AddState(GameStateType.Win, new WinState()); fsm.AddState(GameStateType.Dead, new DeadState()); fsm.GotoState(GameStateType.Play); // level timer timer = startTime; }
public void GotoMainMenu() { fsm.GotoState(GameStateType.MainMenu); EndLevel(); }
private void Start() { fsm.GotoState(GameStateType.Home); }
public void GotoPlay() { fsm.GotoState(GameStateType.Play); }