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


Java GameContainer.setShowFPS方法代碼示例

本文整理匯總了Java中org.newdawn.slick.GameContainer.setShowFPS方法的典型用法代碼示例。如果您正苦於以下問題:Java GameContainer.setShowFPS方法的具體用法?Java GameContainer.setShowFPS怎麽用?Java GameContainer.setShowFPS使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.newdawn.slick.GameContainer的用法示例。


在下文中一共展示了GameContainer.setShowFPS方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: init

import org.newdawn.slick.GameContainer; //導入方法依賴的package包/類
/**
	 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
	 */
	public void init(GameContainer container) throws SlickException {
		container.setShowFPS(false);

		// unicodeFont = new UnicodeFont(Font.decode("Arial Unicode MS"), 25, false, false);
		unicodeFont = new UnicodeFont("c:/windows/fonts/arial.ttf", 48, false, false);
//		unicodeFont.setPaddingBottom(10);
//		unicodeFont.setPaddingRight(10);
//		unicodeFont.setPaddingAdvanceX(-10);
//		unicodeFont.getEffects().add(new ShadowEffect(java.awt.Color.black, 5, 5, 0.5f));
		unicodeFont.getEffects().add(new ColorEffect(java.awt.Color.white));

		// unicodeFont = new UnicodeFont("Arial", 25, false, false);
		// unicodeFont = new UnicodeFont("Everson Mono", 44, false, false);

		// font.addGlyphs(0, 255);
		// font.addGlyphs("[email protected]#$%^&*()");

		container.getGraphics().setBackground(Color.darkGray);
	}
 
開發者ID:j-dong,項目名稱:trashjam2017,代碼行數:23,代碼來源:UnicodeFontTest.java

示例2: init

import org.newdawn.slick.GameContainer; //導入方法依賴的package包/類
/**
	 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
	 */
	public void init(GameContainer container) throws SlickException {
		container.setShowFPS(false);

		// unicodeFont = new UnicodeFont(Font.decode("Arial Unicode MS"), 25, false, false);
		unicodeFont = new UnicodeFont("testdata/font.ttf", 48, false, false);
//		unicodeFont.setPaddingBottom(10);
//		unicodeFont.setPaddingRight(10);
//		unicodeFont.setPaddingAdvanceX(-10);
//		unicodeFont.getEffects().add(new ShadowEffect(java.awt.Color.black, 5, 5, 0.5f));
		unicodeFont.getEffects().add(new ColorEffect(java.awt.Color.white));
        unicodeFont.setDisplayListCaching(true);
		// unicodeFont = new UnicodeFont("Arial", 25, false, false);
		// unicodeFont = new UnicodeFont("Everson Mono", 44, false, false);

		// font.addGlyphs(0, 255);
		// font.addGlyphs("[email protected]#$%^&*()");

		container.getGraphics().setBackground(Color.darkGray);
	}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:23,代碼來源:UnicodeFontTest.java

示例3: init

import org.newdawn.slick.GameContainer; //導入方法依賴的package包/類
/**
 * Initialise resources and the map data
 * 
 * @param container the container the game is running in 
 */
public void init(GameContainer container) throws SlickException {
	container.setShowFPS(false);

	try {
		dataMap = new DataMap("testdata/map.dat");
	} catch (IOException e) {
		throw new SlickException("Failed to load map data", e);
	}
	builder = new NavMeshBuilder();
	navMesh = builder.build(dataMap);
	
	System.out.println("Navmesh shapes: "+navMesh.getSpaceCount());
}
 
開發者ID:j-dong,項目名稱:trashjam2017,代碼行數:19,代碼來源:NavMeshTest.java

示例4: init

import org.newdawn.slick.GameContainer; //導入方法依賴的package包/類
public void init(GameContainer container) throws SlickException {
	container.getInput().addListener(listener);
	container.setShowFPS(false);
	
	system = new ParticleSystem("org/newdawn/slick/data/particle.tga", 2000);
	system.setBlendingMode(ParticleSystem.BLEND_ADDITIVE);
	system.setRemoveCompletedEmitters(false);

	for (int i = 0; i < waiting.size(); i++) {
		system.addEmitter((ParticleEmitter) waiting.get(i));
	}
	waiting.clear();
}
 
開發者ID:j-dong,項目名稱:trashjam2017,代碼行數:14,代碼來源:ParticleGame.java


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