Пример #1
0
        private void Awake()
        {
            if (_instance != null)
            {
                Destroy(gameObject);
            }

            DontDestroyOnLoad(this);
            _instance = this;

            foreach (Transform child in transform)
            {
                child.gameObject.SetActive(true);
                foreach (Transform child2 in child)
                {
                    child2.gameObject.SetActive(true);
                }
            }

            backGroundController  = GetComponentInChildren <PauseMenuDarkBackgroundController>();
            itemObtainedMenu      = GetComponentInChildren <ItemObtainedMenu>();
            titleDisplayer        = GetComponentInChildren <TitleDisplayer>();
            endDemoMenuController = GetComponentInChildren <EndDemoMenuController>();
        }
Пример #2
0
 private void OnDestroy()
 {
     _instance = null;
 }