Exemple #1
0
        private void Awake()
        {
            if (_instance)
            {
                Destroy(gameObject);
                return;
            }

            _instance = this;
        }
Exemple #2
0
        private void OnDestroy()
        {
            if (this == _instance)
            {
                _instance = null;
            }

            ResumeAndRetryScreen.OnBackHome -= ResumeAndRetryScreen_OnBackHome;
            Hud.OnChangeTimeScale           -= Hud_OnChangeTimeScale;
            Hud.OnStartingGame         -= Hud_OnStartingGame;
            GameManager.OnStartingGame -= Hud_OnStartingGame;
            CubeMove.OnPause           -= CubeMove_OnPause;

            Hud.OnPauseGame       -= Hud_OnPauseGame;
            PauseCard.OnRetryGame -= PauseCard_OnRetryGame;
        }