private IEnumerator BeginGameEffect() { if (RelicCollection == null) { RelicCollection = new RelicCollection(); } else { RelicCollection.Reset(); } if (StatisticManager == null) { StatisticManager = new StatisticManager(); } else { StatisticManager.Reset(); } // Fire a game begun event. OnGameBegun(EventArgs.Empty); yield return(Coroutines.Pause(TimingHelper.GetFrameCount(2.5f))); // Kick off the game with a coalsced phase. This should always be the Calm phase and we do want the player to be notified of this. PhaseManager.CoalescePlane(); // Add a coroutine to handle updating remaining game time. CoroutineManager.Add(UpdateRemainingGameTimeKey, UpdateGameTimer()); }
/// <summary> /// Begins the game. /// </summary> public override bool Begin() { var begun = base.Begin(); if (base.Begin()) { CoroutineManager.Add(BeginGameEffect()); } return(begun); }
/// <summary> /// Lightses the on. /// </summary> public void LightsOn() { CoroutineManager.Add(ReturnAmbientLightKey, ReturnAmbientLight()); }
/// <summary> /// Lightses the out. /// </summary> public void LightsOut() { CoroutineManager.Add(RemoveAmbientLightKey, RemoveAmbientLight()); }