private IEnumerable <object> EndCinematic(TransitionCinematic cinematic) { while (cinematic.Running) { if (Submarine.MainSub == null) { yield return(CoroutineStatus.Success); } yield return(CoroutineStatus.Running); } if (Submarine.MainSub == null) { yield return(CoroutineStatus.Success); } End(""); yield return(new WaitForSeconds(18.0f)); SoundPlayer.OverrideMusicType = null; yield return(CoroutineStatus.Success); }
private IEnumerable <object> EndCinematic(TransitionCinematic cinematic) { while (cinematic.Running) { if (Submarine.MainSub == null) { yield return(CoroutineStatus.Success); } yield return(CoroutineStatus.Running); } if (Submarine.MainSub != null) { End(""); } yield return(CoroutineStatus.Success); }
private bool EndRound(GUIButton button, object obj) { isRunning = false; List <Submarine> leavingSubs = obj as List <Submarine>; if (leavingSubs == null) { leavingSubs = new List <Submarine>() { GetLeavingSub() } } ; var cinematic = new TransitionCinematic(leavingSubs, GameMain.GameScreen.Cam, 5.0f); SoundPlayer.OverrideMusicType = CrewManager.GetCharacters().Any(c => !c.IsDead) ? "endround" : "crewdead"; CoroutineManager.StartCoroutine(EndCinematic(cinematic), "EndCinematic"); return(true); }