@Override public void dispose() { super.dispose(); music.dispose(); for (Entity ent : entities) ent.dispose(); enemies.clear(); powerups.clear(); bullets.clear(); }
@Override public void hide() { super.hide(); if (music != null) { music.stop(); music.dispose(); } music = null; if (!gameMode.isGameOver()) { saveStats(); } setPaused(false); }
@Override public void show() { super.show(); // Sets "first" time play to false if (Specular.prefs.getBoolean("First Time")) { // Start tutorial startTutorial(); Specular.prefs.putBoolean("First Time", false); Specular.prefs.flush(); } else if (MenuInputProcessor.helpPressed()) { Specular.prefs.putBoolean("First Time", false); startTutorial(); } if (!Specular.prefs.getBoolean("MusicMuted")) { randomizeMusic(); } if (GfxSettings.ReturnSetting() == GfxSettings.LOW) { PARTICLE_LIMIT = 50; } else if (GfxSettings.ReturnSetting() == GfxSettings.MEDIUM) { PARTICLE_LIMIT = 150; } else { PARTICLE_LIMIT = 300; } scoreFontAlpha = 0; // Initializing power-up levels // AddLife.reloadLevelTextures(Specular.prefs.getFloat("Life Upgrade Grade")); BulletBurst.reloadLevelTextures(Specular.prefs.getFloat("Burst Upgrade Grade")); FireRateBoost.reloadLevelTextures(Specular.prefs.getFloat("Firerate Upgrade Grade")); ScoreMultiplier.reloadLevelTextures(Specular.prefs.getFloat("Multiplier Upgrade Grade")); SlowdownEnemies.reloadLevelTextures(Specular.prefs.getFloat("Slowdown Upgrade Grade")); // BoardshockPowerUp.reloadLevelTextures(Specular.prefs.getFloat("Board Upgrade Grade")); Ricochet.reloadLevelTextures(Specular.prefs.getFloat("Ricochet Upgrade Grade")); Repulsor.reloadLevelTextures(Specular.prefs.getFloat("Repulsor Upgrade Grade")); LaserPowerup.reloadLevelTextures(Specular.prefs.getFloat("Beam Upgrade Grade")); Swarm.reloadLevelTextures(Specular.prefs.getFloat("Swarm Upgrade Grade")); PDSPowerUp.reloadLevelTextures(Specular.prefs.getFloat("PDS Upgrade Grade")); ticks = 0; reset(); }
@Override public void pause() { super.pause(); setPaused(true); }
@Override public void resume() { super.resume(); lastTickTime = System.nanoTime(); setPaused(true); }