1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- namespace KairoEngine.Core
- {
- public enum GameOverCause
- {
- Death,
- Abandon,
- Victory
- }
- public class GamePlayEvents
- {
- public static event System.Action OnGameStart;
- public static event System.Action<GameOverCause> OnGameOver;
- public static event System.Action OnGamePaused;
- public static event System.Action OnGameUnpaused;
- public static void GameStart()
- {
- if(OnGameStart != null)
- {
- OnGameStart();
- }
- }
- public static void GameOver(GameOverCause cause)
- {
- if(OnGameOver != null)
- {
- OnGameOver(cause);
- }
- }
- public static void GamePaused()
- {
- if(OnGamePaused != null)
- {
- OnGamePaused();
- }
- }
- public static void GameUnpaused()
- {
- if(OnGameUnpaused != null)
- {
- OnGameUnpaused();
- }
- }
- }
- }
|