Exemple #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;
  }
Exemple #2
0
 public void removeSprite(Sprite sprite) {
   spritesToRemove.add(sprite);
 }
Exemple #3
0
 public void addSprite(Sprite sprite) {
   spritesToAdd.add(sprite);
   sprite.tick();
 }
Exemple #4
0
 public void checkFireballCollide(Fireball fireball) {
   fireballsToCheck.add(fireball);
 }
Exemple #5
0
 public void checkShellCollide(Shell shell) {
   shellsToCheck.add(shell);
 }