Exemple #1
0
        protected void Awake()
        {
            if (_current == null)
            {
                _current = this;
                Debug.Log("GlobalGUI Awake");
                DontDestroyOnLoad(gameObject);

                _loader      = GetComponentInChildren <LoadingIndicator>(true);
                _winGameText = GetComponentInChildren <WinGameIndicator>(true);

                _loader.Init();

                Debug.Log("SM.SceneManager.GetActiveScene().name: " + SM.SceneManager.GetActiveScene().name);
                if (SM.SceneManager.GetActiveScene().name == "Level1")
                {
                    Debug.Log("WINWINWIN");
                    _winGameText.Init();
                }
            }
            else
            {
                Destroy(gameObject);
            }
        }
Exemple #2
0
        protected void Awake()
        {
            Debug.Log("GlobalGUI Awake");
            DontDestroyOnLoad(gameObject);

            _loader = GetComponentInChildren <LoadingIndicator>(true);
            _loader.Init();
        }