public void ChangeGameState(GameStateID id) { if (currentState != null) { StateExitEvent?.Invoke(currentState.ID); lastState = currentState; } fsm.ChangeState(id); StateEnterEvent?.Invoke(id); currentState = fsm.CurrentState; }
public void StateEnterEvent(string tag) { onEnterState.Invoke(tag); }