本文整理汇总了Java中com.badlogic.gdx.Screen.dispose方法的典型用法代码示例。如果您正苦于以下问题:Java Screen.dispose方法的具体用法?Java Screen.dispose怎么用?Java Screen.dispose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.Screen
的用法示例。
在下文中一共展示了Screen.dispose方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: dispose
import com.badlogic.gdx.Screen; //导入方法依赖的package包/类
@Override
public final void dispose() {
this.screen = null;
for (Screen s : screens.values()) {
s.pause();
s.dispose();
}
this.batch.dispose();
}
示例2: exitCurrentExample
import com.badlogic.gdx.Screen; //导入方法依赖的package包/类
public void exitCurrentExample (){
Screen exitedScreen = getScreen();
setScreen(menuScreen);
if (exitedScreen != null)
exitedScreen.dispose();
selectBox.setSelected(((Example)exitedScreen).getClass());
}
示例3: dispose
import com.badlogic.gdx.Screen; //导入方法依赖的package包/类
@Override
public void dispose (){
Screen exitedScreen = getScreen();
if (exitedScreen != null)
exitedScreen.dispose();
setScreen(null);
spriteBatch.dispose();
skin.dispose();
}
示例4: dispose
import com.badlogic.gdx.Screen; //导入方法依赖的package包/类
@Override
public void dispose() {
log("Dispose");
super.dispose();
for (Screen screen : screens) {
screen.dispose();
}
}
示例5: showScreen
import com.badlogic.gdx.Screen; //导入方法依赖的package包/类
public void showScreen(ScreenEnum screenEnum, Object... params) {
// Get current screen to dispose it
Screen currentScreen = game.getScreen();
// Show new screen
AbstractScreen newScreen = screenEnum.getScreen(params);
newScreen.buildStage();
game.setScreen(newScreen);
// Dispose previous screen
if (currentScreen != null) {
currentScreen.dispose();
}
}
示例6: touchDown
import com.badlogic.gdx.Screen; //导入方法依赖的package包/类
@Override
public boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {
Screen currentScreen = game.getScreen();
game.setScreen(redirectScreen);
currentScreen.dispose();
return true;
}
示例7: touchDown
import com.badlogic.gdx.Screen; //导入方法依赖的package包/类
@Override
public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
Screen currentScreen = game.getScreen();
game.setScreen(new GenerationScreen(game, seed));
currentScreen.dispose();
return true;
}
示例8: dispose
import com.badlogic.gdx.Screen; //导入方法依赖的package包/类
public void dispose()
{
for (Screen screen : screens.values())
{
screen.dispose();
}
screens.clear();
instance = null;
}
示例9: dispose
import com.badlogic.gdx.Screen; //导入方法依赖的package包/类
public synchronized void dispose(Class<? extends Screen> type) {
Screen screen = get(type);
screen.dispose();
screenMap.remove(type);
}