void Awake() { if(Instance != null) { Destroy(this.gameObject); return; } SoundManager.Instance.showDebug = false; SoundManager.SetIgnoreLevelLoad(true); SoundManager.SetCrossDuration(2f); SoundManager.SetVolumeMusic(musicVolume); Instance = this; PlayRandomSong(); }
void Start() { self = this; Vector3 emitterPosition = transform.TransformPoint(Vector3.zero); emitterPosition.z = 0; GameObject gameObject = new GameObject("SFX"); gameObject.transform.position = emitterPosition; gameObject.transform.parent = transform; soundTrackEmitter = gameObject.AddComponent<FMOD_CustonEmitter>(); soundTrackEmitter.Init(soundTrack); soundTrackEmitter.Start(); }
// Use this for initialization void Start() { timerController = GetComponent <SurvivalModeTimerController>(); soundController = GetComponent <SoundController>(); centerItem = GetComponentInChildren <CenterItem>(); clickableObjects = GetComponentsInChildren <SurvivalModeClickableItem>(); gameOverMenu = GetComponentInChildren <GameOverMenu>(); soundTrackController = GetComponentInChildren <SoundTrackController>(); survivalScoreSavingController = GetComponent <SurvivalScoreSavingController>(); //highscore = PlayerPrefs.GetInt("HighScore"); soundTrackController.startSoundtrack(); }
// Use this for initialization void Start() { menuAnimator = GetComponent <Animator>(); soundTrackController = GetComponentInChildren <SoundTrackController>(); soundTrackController.startSoundtrackWithFadeIn(); }