private void Init() { model = menuModelObject.GetComponent <SC_MenuModel>(); objects = model.GetObjects(); audioManager = audioManagerObject.GetComponent <SC_AudioManager>(); scenes = new List <GameObject>(); foreach (KeyValuePair <string, GameObject> obj in objects) { if (obj.Value.name.Contains(SC_MenuModel.SCENE_PREFIX)) { scenes.Add(obj.Value); } if (obj.Value.name.StartsWith(SC_MenuModel.SCENE_PREFIX) && !(obj.Value.name.Contains(SharedDataHandler.nextScreenRequested))) { obj.Value.SetActive(false); } } InitGameObjectInitialStates(); AddRoomEvents(); audioManager.Play(SC_MenuModel.BG_MUSIC_MENU_VAR_NAME); }
private void Init() { audioManager = audioManagerObject.GetComponent <SC_AudioManager>(); HidePreviewSoldier(); countdownManager.SetActive(true); shuffleHandler.SetActive(true); isMyTurn = SharedDataHandler.isPlayerStarting; //audioManager.sounds.Find(sound => sound.name == SC_GameModel.BG_MUSIC_GAMEPLAY_VAR_NAME).volume = SharedDataHandler.globalBgmVolume; InitSoundValues(); audioManager.Play(SC_GameModel.BG_MUSIC_GAMEPLAY_VAR_NAME); }