Example #1
0
        public SLevelIntro(Game1 game, String levelName)
        {
            SoundPanel.StopSong();
            HUD.TIME   = -1;
            Game       = game;
            Game.state = this;
            int sublevelName = levelName.IndexOf(HotDAMN.TAG_SUBLEVEL);
            int nameName     = levelName.IndexOf(HotDAMN.TAG_NAME);

            this.levelName = levelName.Substring(0, sublevelName != -1 ? sublevelName : (nameName != -1 ? nameName : levelName.Length));
            HUD.worldNum[HUD.currentPlayer] = int.Parse(levelName.Substring(0, 1));
            HUD.levelNum[HUD.currentPlayer] = int.Parse(levelName.Substring(2, 1));
        }
Example #2
0
 public SLevelComplete(Game1 game, SInLevel state)
 {
     SoundPanel.StopSong();
     this.counter   = 0;
     this.Game      = game;
     this.state     = state;
     Game.state     = this;
     this.fireworks = HUD.TIME % 10 == 1 || HUD.TIME % 10 == 3 || HUD.TIME % 10 == 6 ? HUD.TIME % 10 : 0;
     for (int i = 0; i < fireworkPos.Length; i++)
     {
         fireworkPos[i] += new Vector2(state.Level.Size.Width, 0);
     }
 }
Example #3
0
        public override void Update()
        {
            base.decoratedPlayer.Update();
            if (timer == HotDAMN.TICKS_UNTIL_STAR_SONG_STOPS)
            {
                SoundPanel.StopSong();
            }
            int increment = timer > HotDAMN.TICKS_UNTIL_STAR_SONG_STOPS ? 1 : 2;

            starFrame = starFrame + increment >= 24 ? 0 : starFrame + increment;

            if (starFrame / 6 % 2 == 0)
            {
                if (starFrame / 6 == 0)
                {
                    base.decoratedPlayer.Sprite.Texture = Textures.mario0;
                }
                else
                {
                    base.decoratedPlayer.Sprite.Texture = Textures.mario2;
                }
            }
            else
            {
                if (starFrame / 6 == 1)
                {
                    base.decoratedPlayer.Sprite.Texture = Textures.mario1;
                }
                else
                {
                    base.decoratedPlayer.Sprite.Texture = Textures.mario3;
                }
            }

            timer++;
            if (timer > HotDAMN.TICKS_UNTIL_STAR_POWER_EXPIRES)
            {
                player.Decorator = new PlainPlayer(player);
            }
        }