Пример #1
0
 private void Awake()
 {
     menuButtonController = GetComponentInParent <MenuButtonController>();
     animator             = GetComponent <Animator>();
     soundManager         = GetComponentInParent <MainMenuSoundManager>();
     canPlay = false;
 }
Пример #2
0
 // Use this for initialization
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     DontDestroyOnLoad(gameObject);
 }
 void Awake()
 {
     getSoundsFromResources();
     instance = this;
 }