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