List of usage examples for com.badlogic.gdx Screen dispose
public void dispose();
From source file:com.forerunnergames.peril.client.ui.screens.ScreenController.java
License:Open Source License
@Override public void shutDown() { for (final Screen screen : screens.values()) { screen.dispose(); }/* w w w . j a v a 2s . co m*/ screens.clear(); }
From source file:com.quadbits.gdxhelper.LWPGame.java
License:Apache License
@Override public void dispose() { // dispose current screen Screen screen = getScreen(); if (screen != null) { screen.dispose(); }//ww w. j a v a 2 s . c o m // dispose assets lazyAssetManager.get().dispose(); super.dispose(); }
From source file:genuini.game.ScreenManager.java
public void showScreen(ScreenEnum screenEnum, Object... params) { // Get current screen to dispose it Screen currentScreen = game.getScreen(); // Dispose previous screen if (currentScreen != null) { currentScreen.dispose(); }/*from w w w . j ava 2s . c o m*/ // Show new screen AbstractScreen newScreen = screenEnum.getScreen(params); newScreen.buildStage(); game.setScreen(newScreen); }
From source file:io.piotrjastrzebski.sfg.SFGApp.java
License:Open Source License
@Override public void setScreen(Screen screen) { final Screen prev = getScreen(); super.setScreen(screen); if (prev != null) prev.dispose(); }