示例#1
0
        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());
        }
示例#2
0
        /// <summary>
        /// Begins the game.
        /// </summary>
        public override bool Begin()
        {
            var begun = base.Begin();

            if (base.Begin())
            {
                CoroutineManager.Add(BeginGameEffect());
            }

            return(begun);
        }
示例#3
0
 /// <summary>
 /// Lightses the on.
 /// </summary>
 public void LightsOn()
 {
     CoroutineManager.Add(ReturnAmbientLightKey, ReturnAmbientLight());
 }
示例#4
0
 /// <summary>
 /// Lightses the out.
 /// </summary>
 public void LightsOut()
 {
     CoroutineManager.Add(RemoveAmbientLightKey, RemoveAmbientLight());
 }