Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
        /// <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;
            }
        }
Ejemplo n.º 3
0
 void OnResumeButtonClicked()
 {
     ResumeGame.Invoke();
 }
Ejemplo n.º 4
0
 private void OnButtonClicked()
 {
     ResumeGame?.Invoke();
 }
Ejemplo n.º 5
0
 public static void OnResumeGame()
 {
     ResumeGame?.Invoke();
 }
Ejemplo n.º 6
0
 private void OnResumeGame()
 {
     ResumeGame?.Invoke();
 }