Example #1
0
  protected void reset() {
    paused = false;
    Sprite.spriteContext = this;
    sprites.clear();

    try {
      level = currentLevel.clone();
    } catch (CloneNotSupportedException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    level.resetSpriteTemplate();

    layer = new LevelRenderer(level, graphicsConfiguration, 320, 240);

    double oldX = 0;

    if (mario != null) oldX = mario.x;

    mario = new Mario(this);
    sprites.add(mario);
    startTime = 1;

    timeLeft = 200 * 15;
    Art.startMusic(1);
    tick = 0;
    //        recorder = new DataRecorder(this,level,keys,gametype);
    if (recorder != null) {
      recorder.detailedLog = "";
    }
    gameStarted = false;
  }
Example #2
0
 public void removeSprite(Sprite sprite) {
   spritesToRemove.add(sprite);
 }
Example #3
0
 public void addSprite(Sprite sprite) {
   spritesToAdd.add(sprite);
   sprite.tick();
 }
Example #4
0
 public void checkFireballCollide(Fireball fireball) {
   fireballsToCheck.add(fireball);
 }
Example #5
0
 public void checkShellCollide(Shell shell) {
   shellsToCheck.add(shell);
 }