Exemplo n.º 1
0
 public void Update()
 {
     state.Update();
     if (counter == HotDAMN.TICKS_UNTIL_CASTLE_COMPLETE_FINISH)
     {
         if (HUD.level.player.AutoMove != null)
         {
             HUD.level.player.AutoMove.IsActive = false;
         }
         HUD.MARIO_STATE[HUD.currentPlayer]        = (IPlayerState)state.Level.player.State;
         HUD.firstLevelEntrance[HUD.currentPlayer] = true;
         HUD.midpointHit[HUD.currentPlayer]        = false;
         HUD.NextLevel();
         Game.state = new SLevelIntro(Game, HUD.worldNum[HUD.currentPlayer] + "-" + HUD.levelNum[HUD.currentPlayer]);
     }
     counter++;
 }
Exemplo n.º 2
0
        public void Update()
        {
            counter++;
            state.Update();

            if (counter == HotDAMN.TICKS_UNTIL_LEVEL_COMPELTE_FANFARE)
            {
                SoundPanel.PlaySong(Sound.levelcompleteTheme, false);
            }
            if (counter >= HotDAMN.TICKS_UNTIL_LEVEL_TIMER_TALLIES && HUD.TIME > 0)
            {
                HUD.TIME--;
                HUD.SCORE[HUD.currentPlayer] += 50;
                SoundPanel.PlaySoundEffect(Sound.scoreEffect);
            }
            if (HUD.TIME == 0)
            {
                HUD.TIME = -1;
                counter  = 1000000;
            }
            if (HUD.TIME == -1 && (fireworks > 0 && counter % 35 == 0))
            {
                HUD.level.AddParticle(new Fireworks(fireworkPos[fireworkCounter]));
                fireworkCounter++;
                fireworks--;
            }
            if (counter >= 1000000 + (fireworks + 2) * HotDAMN.TICKS_UNTIL_NEXT_FIREWORK)
            {
                if (HUD.level.player.AutoMove != null)
                {
                    HUD.level.player.AutoMove.IsActive = false;
                }
                HUD.MARIO_STATE[HUD.currentPlayer]        = (IPlayerState)state.Level.player.State;
                HUD.firstLevelEntrance[HUD.currentPlayer] = true;
                HUD.midpointHit[HUD.currentPlayer]        = false;
                HUD.NextLevel();
                Game.state = new SLevelIntro(Game, HUD.worldNum[HUD.currentPlayer] + "-" + HUD.levelNum[HUD.currentPlayer]);
            }
        }