void Awake() { if (Instance != null) { Destroy(gameObject); } else { Instance = this; } //altitudeBlend = new AudioMixerSnapshot[] {hiLandsSnapshot, loLandsSnapshot}; tonesClipPool = Resources.LoadAll <AudioClip> ("Tones"); voiceClipPool = Resources.LoadAll <AudioClip> ("Voice"); confirmationTones = Resources.LoadAll <AudioClip> ("ConfirmationTones"); tutorialTones = Resources.LoadAll <AudioClip> ("TutorialTones"); dadaMixer.SetFloat("ImageSpriteVol", -50f); dadaMixer.SetFloat("InkSpriteVol", -50f); dadaMixer.SetFloat("NPCStemVol", -50f); dadaMixer.SetFloat("NonPickupVol", -50f); //PopulateRandomList (voiceClipPool, ClipsPlayList); //DontDestroyOnLoad(this.gameObject); }
void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); } else { instance = this; } DontDestroyOnLoad(this.gameObject); }
void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); } else { instance = this; } DontDestroyOnLoad(this.gameObject); if (SceneManager.GetActiveScene().name == "Menu") { StartMenu(); } numTreesFound = 0; gameScore = 0f; }