void Start() { globalSoundManager = GlobalSoundManager.Get(); globalSoundManager.Play(prepare); text = GetComponent <Text>(); remainSeconds = 10; StartCoroutine(StartAnimation()); }
private void CreateSingleton() { if (Inst == null) { Inst = this; } else { Destroy(this); } }
// void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
void Awake() { globalSoundManager = transform.Find("GlobalSoundManager").GetComponent <GlobalSoundManager>(); playerStatus = GetComponent <NetworkPlayerStatus>(); PhotonNetwork.autoJoinLobby = true; HandleMainUIEvents(); HandleBrowseServerUIEvents(); HandleCreateServerUIEvents(); HandleWaitingRoomUIEvents(); loginUI.SetActive(true); }
void Awake() { globalSoundManager = GlobalSoundManager.Get(); }
private void Awake() { DontDestroyOnLoad(gameObject); //can be accessed anywhere instance = this; }