public void ChangeGameStatus(GameStatics.GAME_STATUS nextStatus) { GameStatics.GAME_STATUS beforeGameStatus = currentGameStatus; currentGameStatus = nextStatus; if (onChangeGameStatus != null) { onChangeGameStatus(beforeGameStatus, currentGameStatus); } }
private void Awake() { if (instance == null) { instance = GetComponent <GameManager>(); DontDestroyOnLoad(this); } else { Destroy(this.gameObject); } currentGameStatus = GameStatics.GAME_STATUS.NONE; ChangeGameStatus(GameStatics.GAME_STATUS.SPLASH); }