本文整理匯總了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);
}
示例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);
}
示例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());
}
示例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();
}