public static void Notify(object sender, GameEventArgs e)
        {
            switch (e.type)
            {
            case START_GAME:
                StartGame?.Invoke(sender, e);
                break;

            case PAUSE_GAME:
                PauseGame?.Invoke(sender, e);
                break;

            case RESUME_GAME:
                ResumeGame?.Invoke(sender, e);
                break;

            case STOP_GAME:
                StopGame?.Invoke(sender, e);
                break;

            case RESTART_GAME:
                RestartGame?.Invoke(sender, e);
                break;

            case START_MINI_GAME:
                StartMiniGame?.Invoke(sender, e);
                break;

            case END_MINI_GAME:
                EndMiniGame?.Invoke(sender, e);
                break;
            }
        }
        /// <summary>
        /// Use it for notify from EventTrigger Component. Requires to be component on GameObject!
        /// </summary>
        /// <param name="sender">The sender object.</param>
        /// <param name="e">Event arguments</param>
        public void Notify(string type)
        {
            switch (type)
            {
            case START_GAME:
                StartGame?.Invoke(null, new GameEventArgs(type));
                break;

            case PAUSE_GAME:
                PauseGame?.Invoke(null, new GameEventArgs(type));
                break;

            case RESUME_GAME:
                ResumeGame?.Invoke(null, new GameEventArgs(type));
                break;

            case STOP_GAME:
                StopGame?.Invoke(null, new GameEventArgs(type));
                break;

            case RESTART_GAME:
                RestartGame?.Invoke(null, new GameEventArgs(type));
                break;

            case START_MINI_GAME:
                StartMiniGame?.Invoke(null, new GameEventArgs(type));
                break;

            case END_MINI_GAME:
                EndMiniGame?.Invoke(null, new GameEventArgs(type));
                break;
            }
        }
 void OnResumeButtonClicked()
 {
     ResumeGame.Invoke();
 }
Example #4
0
 private void OnButtonClicked()
 {
     ResumeGame?.Invoke();
 }
Example #5
0
 public static void OnResumeGame()
 {
     ResumeGame?.Invoke();
 }
Example #6
0
 private void OnResumeGame()
 {
     ResumeGame?.Invoke();
 }