private IEnumerator GameInitialized() // called when the game has been initialized { audio.PlayVoice(36); // explanation of game mechanics yield return(new WaitForSeconds(audio.GetVoiceLength(36))); // wait for the explanation to be finished game.Start(); // then start the game }
private IEnumerator StartRoom() { audio.PlaySound(1); // collapse yield return(new WaitForSeconds(audio.GetSoundLength(1))); audio.PlayVoice(35); // "Hallo?" yield return(new WaitForSeconds(audio.GetVoiceLength(35))); // initialize pipes lighting.SwitchToLights(Light.PipesLeft, Light.PipesRight); Room.GetGame <PipesGame>().Initialize(GameDifficulty.Medium); }
private IEnumerator GameInitialized() { audio.PlayVoice(84); // introduction yield return(new WaitForSeconds(audio.GetVoiceLength(84))); lighting.SwitchToLights(Light.CraneLeft, Light.CraneRight); audio.PlayVoice(85); // explanation of game mechanics yield return(new WaitForSeconds(audio.GetVoiceLength(85))); game.Start(); }
private IEnumerator GameInitialized(DynamiteGame game) { lighting.SwitchToLights(Light.Dynamite); audio.PlayVoice(131); // "Die Wand hier..." yield return(new WaitForSeconds(audio.GetVoiceLength(131))); int instructionsVoiceClip = instructionsVoiceClips[game.ScenarioNumber - 1]; audio.PlayVoice(instructionsVoiceClip); // "Benutzt Sprengtafel..." yield return(new WaitForSeconds(audio.GetVoiceLength(instructionsVoiceClip))); audio.PlayVoice(136); // "Wenn alles richtig platziert ist..." yield return(new WaitForSeconds(audio.GetVoiceLength(136))); game.Start(); }
private IEnumerator GameInitialized(TriggersGame game) { audio.PlayVoice(163); // "Jetzt der letzte Schritt." yield return(new WaitForSeconds(audio.GetVoiceLength(163))); lighting.SwitchToLights(Light.Trigger); audio.PlayVoice(164); // "Seht ihr den Sprengkasten..." yield return(new WaitForSeconds(audio.GetVoiceLength(164))); if (game.Difficulty == GameDifficulty.Hard) { audio.PlayVoice(166); // "Es kann vorkommen..." yield return(new WaitForSeconds(audio.GetVoiceLength(166))); } game.Start(); }
public void OnRoomStateChanged(EscapeRoom <IEtsInterface> sender, RoomStateChangedEventArgs e) { if (e.NewState == RoomState.Initialized) { float maxTimeInGames = RoomMaster.MaxTimePipes + RoomMaster.MaxTimeCrates + RoomMaster.MaxTimeDynamite + RoomMaster.MaxTimeTriggers; float totalAudioTime = 0; foreach (int voiceNumber in betweenGamesVoiceNumbers) { totalAudioTime += audio.GetVoiceLength(voiceNumber); } timeLeft = maxTimeInGames + totalAudioTime; failuresDetected = e.DiagnosticsReport.FailuresDetected; } if (e.NewState == RoomState.Running) { //lblTime.gameObject.SetActive(true); lblDoNotEnter.SetActive(true); lblGameInProgress.SetActive(true); lblPleaseWait.SetActive(false); lblComing.SetActive(false); lblScoreCaptionPrevious.SetActive(false); lblScoreCaptionCurrent.SetActive(true); lblScorePipes.text = "-"; lblScoreCrane.text = "-"; lblScoreDynamite.text = "-"; lblScoreTrigger.text = "-"; } if (e.NewState != RoomState.Running) { lblScoreCaptionPrevious.SetActive(true); lblScoreCaptionCurrent.SetActive(false); } if (e.NewState == RoomState.Initialized) { //lblTime.gameObject.SetActive(false); lblTime.text = "00:00"; lblDoNotEnter.SetActive(false); lblGameInProgress.SetActive(false); lblPleaseWait.SetActive(true); lblComing.SetActive(true); } }