Beispiel #1
0
 public void LevelRestart() //Restart the level, and decreases lives, and keeps the points.
 {
     camera = new Camera();
     hud.setWorld(TheLevelNumberVariableWithADescriptiveNameThatIsWithTheOtherVariables);
     Character.ChangeLevel(marioStartPosition);
     CurrentState = new PlayGameState(this, GraphicsDevice);
 }
Beispiel #2
0
 public void Reset() //hard reset, will loose all progress
 {
     camera = new Camera();
     hud.setWorld(TheLevelNumberVariableWithADescriptiveNameThatIsWithTheOtherVariables);
     Character    = new Mario(marioStartPosition, this);
     CurrentState = new PlayGameState(this, GraphicsDevice);
 }
Beispiel #3
0
        public void LevelClear() //Clears the previous level, and loads the next one.
        {
            TheLevelNumberVariableWithADescriptiveNameThatIsWithTheOtherVariables++;
            MediaPlayer.Stop();
            MediaPlayer.Play(marioTheme);
            List <String[]> map = LevelLoader.Instance.loadLevel(LevelChanger());

            castle       = LevelFactory.Instance.CreateCastle(BackgroundCreator.LoadCastle());
            CurrentState = new PlayGameState(this, this.GraphicsDevice);
            camera       = new Camera();
            Character.ChangeLevel(marioStartPosition);
            hud.setWorld(TheLevelNumberVariableWithADescriptiveNameThatIsWithTheOtherVariables);
        }