コード例 #1
0
ファイル: MenuButton.cs プロジェクト: omrirosen/GoldenPine
 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);
 }
コード例 #3
0
 void Awake()
 {
     getSoundsFromResources();
     instance = this;
 }