private void Effect(bool fadeIn = true, Action callback = null) { if (!_isFading) { if (_effectCoroutine != null) { MonoBehaviorHelper.StopCoroutine(_effectCoroutine); } _effectCoroutine = MonoBehaviorHelper.StartCoroutine(EffectCoroutine(fadeIn, callback)); } }
void Start() { if (instance == null) { DontDestroyOnLoad(this); instance = this; } else { Destroy(this); } }
public void Menu() { EventSystem.GameController_MainMenu.Notify(); MonoBehaviorHelper.StartCoroutine(Transition(Scenes.MainMenu)); }
public void Play() { EventSystem.GameController_GameStart.Notify(); MonoBehaviorHelper.StartCoroutine(Transition(Scenes.GamePlay)); }