Exemplo n.º 1
0
    private void Effect(bool fadeIn = true, Action callback = null)
    {
        if (!_isFading)
        {
            if (_effectCoroutine != null)
            {
                MonoBehaviorHelper.StopCoroutine(_effectCoroutine);
            }

            _effectCoroutine = MonoBehaviorHelper.StartCoroutine(EffectCoroutine(fadeIn, callback));
        }
    }
Exemplo n.º 2
0
 void Start()
 {
     if (instance == null)
     {
         DontDestroyOnLoad(this);
         instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
Exemplo n.º 3
0
 public void Menu()
 {
     EventSystem.GameController_MainMenu.Notify();
     MonoBehaviorHelper.StartCoroutine(Transition(Scenes.MainMenu));
 }
Exemplo n.º 4
0
 public void Play()
 {
     EventSystem.GameController_GameStart.Notify();
     MonoBehaviorHelper.StartCoroutine(Transition(Scenes.GamePlay));
 }