private void InvokeStateEvents(GameStates state)
        {
            switch (state)
            {
            case GameStates.Menu:
                MainMenuEvent?.Invoke();
                ClearEntities();
                break;

            case GameStates.GenerateMap:
                GenerateMenuEvent?.Invoke();
                ClearEntities();
                break;

            case GameStates.PlayMap:
                PlayMapMenuEvent?.Invoke();
                GameStartedEvent?.Invoke();
                break;

            default:
                break;
            }
        }
Exemplo n.º 2
0
 private void OnDisable()
 {
     OnClose.Invoke(this);
 }
Exemplo n.º 3
0
 private void OnEnable()
 {
     OnOpen.Invoke(this);
 }