當前位置: 首頁>>代碼示例>>Java>>正文


Java Screen.dispose方法代碼示例

本文整理匯總了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();
}
 
開發者ID:eskalon,項目名稱:ProjektGG,代碼行數:11,代碼來源:ProjektGG.java

示例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());
}
 
開發者ID:CypherCove,項目名稱:gdx-cclibs,代碼行數:8,代碼來源:ExampleRunner.java

示例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();
}
 
開發者ID:CypherCove,項目名稱:gdx-cclibs,代碼行數:10,代碼來源:ExampleRunner.java

示例4: dispose

import com.badlogic.gdx.Screen; //導入方法依賴的package包/類
@Override
public void dispose() {
	log("Dispose");
	super.dispose();
	for (Screen screen : screens) {
		screen.dispose();
	}
}
 
開發者ID:CherokeeLanguage,項目名稱:cll1-gdx,代碼行數:9,代碼來源:AbstractGame.java

示例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();
        }
    }
 
開發者ID:fr3ndyl33,項目名稱:123Dor,代碼行數:16,代碼來源:ScreenManager.java

示例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;
   }
 
開發者ID:gcleenew,項目名稱:RottenCave,代碼行數:8,代碼來源:ButtonRedirectListener.java

示例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;
}
 
開發者ID:gcleenew,項目名稱:RottenCave,代碼行數:8,代碼來源:SeedPlayGameListener.java

示例8: dispose

import com.badlogic.gdx.Screen; //導入方法依賴的package包/類
public void dispose()
{
	for (Screen screen : screens.values())
	{
		screen.dispose();
	}
	screens.clear();
	instance = null;
}
 
開發者ID:xzela,項目名稱:jastroblast,代碼行數:10,代碼來源:ScreenManager.java

示例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);
}
 
開發者ID:EtherWorks,項目名稱:arcadelegends-gg,代碼行數:6,代碼來源:ScreenManager.java


注:本文中的com.badlogic.gdx.Screen.dispose方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。