当前位置: 首页>>代码示例>>Java>>正文


Java AngelCodeFont类代码示例

本文整理汇总了Java中org.newdawn.slick.AngelCodeFont的典型用法代码示例。如果您正苦于以下问题:Java AngelCodeFont类的具体用法?Java AngelCodeFont怎么用?Java AngelCodeFont使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AngelCodeFont类属于org.newdawn.slick包,在下文中一共展示了AngelCodeFont类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import org.newdawn.slick.AngelCodeFont; //导入依赖的package包/类
/**
 * @see org.newdawn.slick.Game#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
	font = new AngelCodeFont("testdata/perffont.fnt","testdata/perffont.png");
	
	for (int j=0;j<2;j++) {
		int lineLen = 90;
		for (int i=0;i<text.length();i+=lineLen) {
			if (i+lineLen > text.length()) {
				lineLen = text.length() - i;
			}
			
			lines.add(text.substring(i, i+lineLen));	
		}
		lines.add("");
	}
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:19,代码来源:FontPerformanceTest.java

示例2: init

import org.newdawn.slick.AngelCodeFont; //导入依赖的package包/类
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
	LoadingList.setDeferredLoading(true);
	
	new Sound("testdata/cbrown01.wav");
	new Sound("testdata/engine.wav");
	sound = new Sound("testdata/restart.ogg");
	new Music("testdata/testloop.ogg");
	music = new Music("testdata/SMB-X.XM");
	
	new Image("testdata/cursor.png");
	new Image("testdata/cursor.tga");
	new Image("testdata/cursor.png");
	new Image("testdata/cursor.png");
	new Image("testdata/dungeontiles.gif");
	new Image("testdata/logo.gif");
	image = new Image("testdata/logo.tga");
	new Image("testdata/logo.png");
	new Image("testdata/rocket.png");
	new Image("testdata/testpack.png");
	
	font = new AngelCodeFont("testdata/demo.fnt", "testdata/demo_00.tga");
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:26,代码来源:DeferredLoadingTest.java

示例3: initStatesList

import org.newdawn.slick.AngelCodeFont; //导入依赖的package包/类
@Override public void initStatesList(GameContainer gc) throws SlickException {
	// First initialise our default font. We need to draw with display list
	// caching disabled
	defaultFont = new AngelCodeFont(
		"org/newdawn/slick/data/defaultfont.fnt",
		"org/newdawn/slick/data/defaultfont.png",
		false);
	
	addState(new SplashScreen());
	addState(new Game());
	addState(new Grace());
	addState(new Pause());
	addState(new Lose());
	addState(new Win());
	addState(new HighScoreState());
}
 
开发者ID:ErikaRedmark,项目名称:monkey-shines-java-port,代码行数:17,代码来源:SlickMonkeyShines.java

示例4: init

import org.newdawn.slick.AngelCodeFont; //导入依赖的package包/类
@Override
public void init(GameContainer container, StateBasedGame game) throws SlickException {
	fontImage = new Image("res/font/lcd_solid_9_00.png");
	fontImage.setFilter(Image.FILTER_NEAREST);
	font = new AngelCodeFont("res/font/lcd_solid_9.fnt", fontImage);
	
	backButtonImage = new Image("res/img/ui/backButton.png");
	backButtonImage.setFilter(Image.FILTER_NEAREST);
	backButton = new Button(80f, 160f, backButtonImage.getWidth(), backButtonImage.getHeight(), backButtonImage);	
	
	dealWithIt = new Image("res/img/ui/dealwithit.png");
	dealWithIt.setFilter(Image.FILTER_NEAREST);
	dealWithItXPos = 36f;
	dealWithItYPos = -20f;
	dealWithItYTarget = 72f;
	printTheEnd = 0;
	printTheEndTarget = 1000;
	
	// Sprite sheep strikes back
	SpriteSheet spriteSheep = new SpriteSheet("res/img/character/bartender alpha.png", 16, 16);
	characterImage =  spriteSheep.getSprite(3, 0);
	characterImage.setFilter(Image.FILTER_NEAREST);
	
	bookImage = new Image("res/img/items/book.png");
	bookImage.setFilter(Image.FILTER_NEAREST);
}
 
开发者ID:lucas-tulio,项目名称:reddit-game-jam-5,代码行数:27,代码来源:FinishedState.java

示例5: init

import org.newdawn.slick.AngelCodeFont; //导入依赖的package包/类
@Override
public void init(GameContainer container, StateBasedGame game) throws SlickException {

	fontImage = new Image("res/font/lcd_solid_9_00.png");
	fontImage.setFilter(Image.FILTER_NEAREST);
	font = new AngelCodeFont("res/font/lcd_solid_9.fnt", fontImage);
	
	startButtonImage = new Image("res/img/ui/startButton.png");
	startButtonImage.setFilter(Image.FILTER_NEAREST);
	creditsButtonImage= new Image("res/img/ui/creditsButton.png");
	creditsButtonImage.setFilter(Image.FILTER_NEAREST);
	quitButtonImage= new Image("res/img/ui/quitButton.png");
	quitButtonImage.setFilter(Image.FILTER_NEAREST);
	
	startButton = new Button(80f, 120f, startButtonImage.getWidth(), startButtonImage.getHeight(), startButtonImage);
	creditsButton = new Button(80f, 140f, creditsButtonImage.getWidth(), creditsButtonImage.getHeight(), creditsButtonImage);
	quitButton = new Button(80f, 160f, quitButtonImage.getWidth(), quitButtonImage.getHeight(), quitButtonImage);
}
 
开发者ID:lucas-tulio,项目名称:reddit-game-jam-5,代码行数:19,代码来源:MenuState.java

示例6: init

import org.newdawn.slick.AngelCodeFont; //导入依赖的package包/类
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
	testImage = new Image("testdata/logo.png");
	preloaded = new Image("testdata/logo.png");
	testFont = new AngelCodeFont("testdata/hiero.fnt","testdata/hiero.png");
	target = new Image(400,300);
	cut = new Image(100,100);
	gTarget = target.getGraphics();
	offscreenPreload = preloaded.getGraphics();
	
	offscreenPreload.drawString("Drawing over a loaded image", 5, 15);
	offscreenPreload.setLineWidth(5);
	offscreenPreload.setAntiAlias(true);
	offscreenPreload.setColor(Color.blue.brighter());
	offscreenPreload.drawOval(200, 30, 50, 50);
	offscreenPreload.setColor(Color.white);
	offscreenPreload.drawRect(190,20,70,70);
	offscreenPreload.flush();
	
	if (GraphicsFactory.usingFBO()) {
		using = "FBO (Frame Buffer Objects)";
	} else if (GraphicsFactory.usingPBuffer()) {
		using = "Pbuffer (Pixel Buffers)";
	}
	
	System.out.println(preloaded.getColor(50,50));
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:30,代码来源:ImageGraphicsTest.java

示例7: init

import org.newdawn.slick.AngelCodeFont; //导入依赖的package包/类
/**
 * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
	image = new Image("testdata/rocket.png");
	back = new Image("testdata/sky.jpg");
	font = new AngelCodeFont("testdata/hiero.fnt","testdata/hiero.png");
	SpriteSheet sheet = new SpriteSheet("testdata/homeranim.png", 36, 65);
	homer = new Animation(sheet, 0,0,7,0,true,150,true);
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:11,代码来源:SlickCallableTest.java

示例8: init

import org.newdawn.slick.AngelCodeFont; //导入依赖的package包/类
/**
 * @see org.newdawn.slick.Game#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
	font = new AngelCodeFont("testdata/demo2.fnt","testdata/demo2_00.tga");
	font2 = new AngelCodeFont("testdata/hiero.fnt","testdata/hiero.png");
	image = new Image("testdata/demo2_00.tga", false);
       widthFont = new AngelCodeFont("testdata/courier14_h2.fnt","testdata/courier14_h2.png",true);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:10,代码来源:FontTest.java

示例9: init

import org.newdawn.slick.AngelCodeFont; //导入依赖的package包/类
@Override
public void init(GameContainer container, StateBasedGame game) throws SlickException {

	fontImage = new Image("res/font/lcd_solid_9_00.png");
	fontImage.setFilter(Image.FILTER_NEAREST);
	font = new AngelCodeFont("res/font/lcd_solid_9.fnt", fontImage);
	
	backButtonImage = new Image("res/img/ui/backButton.png");
	backButtonImage.setFilter(Image.FILTER_NEAREST);
	
	backButton = new Button(80f, 160f, backButtonImage.getWidth(), backButtonImage.getHeight(), backButtonImage);		
}
 
开发者ID:lucas-tulio,项目名称:reddit-game-jam-5,代码行数:13,代码来源:CreditsState.java

示例10: init

import org.newdawn.slick.AngelCodeFont; //导入依赖的package包/类
@Override
public void init(GameContainer container, StateBasedGame game) throws SlickException {
	
	// Start the font
	fontImage = new Image("res/font/lcd_solid_9_00.png");
	fontImage.setFilter(Image.FILTER_NEAREST);
	font = new AngelCodeFont("res/font/lcd_solid_9.fnt", fontImage);
	
	// Start the map
	map = new Map("res/map/dungeon.tmx");
	
	// Start the time
	currentTime = 0;
	
	// Sound
	piano = new Sound("res/sfx/piano.wav");
	playedFirstPiano = false;
	playedSecondPiano = false;
	
	// Create the Entities
	character = new Character(27, 27);
	book = new Book(4, 1);
	//book = new Book(25, 27);
	
	enemy = new Enemy[7];
	enemy[0] = new Enemy(2, 6);
	enemy[1] = new Enemy(2, 18);
	enemy[2] = new Enemy(13, 15);
	enemy[3] = new Enemy(10, 2);
	enemy[4] = new Enemy(27, 2);
	enemy[5] = new Enemy(23, 15);
	enemy[6] = new Enemy(14, 25);
}
 
开发者ID:lucas-tulio,项目名称:reddit-game-jam-5,代码行数:34,代码来源:MainState.java

示例11: init

import org.newdawn.slick.AngelCodeFont; //导入依赖的package包/类
/**
 * @see org.newdawn.slick.state.BasicGameState#init(org.newdawn.slick.GameContainer, org.newdawn.slick.state.StateBasedGame)
 */
public void init(GameContainer container, StateBasedGame game) throws SlickException {
	this.game = game;
	font = new AngelCodeFont("testdata/demo2.fnt","testdata/demo2_00.tga");
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:8,代码来源:TestState1.java

示例12: init

import org.newdawn.slick.AngelCodeFont; //导入依赖的package包/类
/**
 * @see org.newdawn.slick.state.BasicGameState#init(org.newdawn.slick.GameContainer, org.newdawn.slick.state.StateBasedGame)
 */
public void init(GameContainer container, StateBasedGame game) throws SlickException {
	font = new AngelCodeFont("testdata/demo2.fnt","testdata/demo2_00.tga");
	this.game = game;
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:8,代码来源:TestState3.java

示例13: init

import org.newdawn.slick.AngelCodeFont; //导入依赖的package包/类
/**
 * @see org.newdawn.slick.state.BasicGameState#init(org.newdawn.slick.GameContainer, org.newdawn.slick.state.StateBasedGame)
 */
public void init(GameContainer container, StateBasedGame game) throws SlickException {
	this.game = game;
	font = new AngelCodeFont("testdata/demo2.fnt","testdata/demo2_00.tga");
	image = new Image("testdata/logo.tga");
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:9,代码来源:TestState2.java

示例14: init

import org.newdawn.slick.AngelCodeFont; //导入依赖的package包/类
/**
 * @see org.newdawn.slick.Game#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
	font = new AngelCodeFont("testdata/demo2.fnt","testdata/demo2_00.tga");
	font2 = new AngelCodeFont("testdata/hiero.fnt","testdata/hiero.png");
	image = new Image("testdata/demo2_00.tga", false);
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:9,代码来源:FontTest.java

示例15: init

import org.newdawn.slick.AngelCodeFont; //导入依赖的package包/类
/**
 * @see org.newdawn.slick.Game#init(org.newdawn.slick.GameContainer)
 */
public void init(GameContainer container) throws SlickException {
	image = new Image("testdata/sky.jpg");
	font = new AngelCodeFont("testdata/hiero.fnt","testdata/hiero.png");
}
 
开发者ID:j-dong,项目名称:trashjam2017,代码行数:8,代码来源:PureFontTest.java


注:本文中的org.newdawn.slick.AngelCodeFont类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。