Esempio n. 1
0
 private void CheckEndGame()
 {
     if (!isLevelComplete)
     {
         if (IsEndGame())
         {
             Game1.State.Proceed();
             MarioInfo.StopTimer();
             isLevelComplete = true;
             ScoringSystem.AddPointsForPole(mario.Destination);
             IItem flag_ = null;
             foreach (IGameObject obj in itemList)
             {
                 if (obj.GetType() == typeof(Flag))
                 {
                     flag_ = (IItem)obj;
                 }
             }
             victoryAnimation       = new VictoryAnimation(mario, flag_);
             victoryAnimation.State = AnimationState.IsPlaying;
         }
     }
     else
     {
         victoryAnimation.Update();
     }
 }