Пример #1
0
        protected virtual void SetPhase(GamePhase phase)
        {
            this.Phase = phase;
            if (phase == GamePhase.WarmUp)
            {
                PhaseEndTime = GameTime.Ticks + Scenario.WarmUpDuration;
            }
            else if (phase == GamePhase.FadeOut)
            {
                PhaseEndTime = GameTime.Ticks + FadeOutDuration;
            }
            else
            {
                PhaseEndTime = GameTime.Ticks + Scenario.FightDuration;
            }

            if (Phase != GamePhase.WarmUp)
            {
                MissionScreen.Hide();
            }

            OnPhaseChange?.Invoke();

            Log.Logger.Log("Set phase " + phase);
        }
Пример #2
0
 protected virtual void End()
 {
     try
     {
         VictoryVis?.Hide();
         MissionScreen.Hide();
         ScoreBoard?.Close();
         ActiveMode    = null;
         NPCClass.Hero = null;
     }
     catch (Exception e)
     {
         Log.Logger.LogWarning((VictoryVis != null) + " " + (ScoreBoard != null) + " " + e.ToString());
     }
 }