本文整理汇总了Java中com.badlogic.gdx.graphics.g2d.BitmapFont.setScale方法的典型用法代码示例。如果您正苦于以下问题:Java BitmapFont.setScale方法的具体用法?Java BitmapFont.setScale怎么用?Java BitmapFont.setScale使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.graphics.g2d.BitmapFont
的用法示例。
在下文中一共展示了BitmapFont.setScale方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: load
import com.badlogic.gdx.graphics.g2d.BitmapFont; //导入方法依赖的package包/类
public static void load() {
texture = new Texture(Gdx.files.internal("data/boytexture.png"));
texture.setFilter(Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest);
bg = new TextureRegion(new Texture((Gdx.files.internal("data/floor.png"))));
bg.flip(false, true);
boyhead = new TextureRegion(new Texture((Gdx.files.internal("data/boy.png"))));
boyhead.flip(false, true);
boyshadow = new TextureRegion(new Texture((Gdx.files.internal("data/boyshadow.png"))));
boyshadow.flip(false, true);
goal = new TextureRegion(new Texture((Gdx.files.internal("data/kth.png"))));
goal.flip(false, true);
wall = new TextureRegion(new Texture((Gdx.files.internal("data/wall2.png"))));
wall.flip(false, true);
wall2 = new TextureRegion(new Texture((Gdx.files.internal("data/wall.png"))));
wall2.flip(false, true);
dead = Gdx.audio.newSound(Gdx.files.internal("data/dead.wav"));
coin = Gdx.audio.newSound(Gdx.files.internal("data/coin.wav"));
flap = Gdx.audio.newSound(Gdx.files.internal("data/flap.wav"));
wallfx = Gdx.audio.newSound(Gdx.files.internal("data/vulture.wav"));
goalfx = Gdx.audio.newSound(Gdx.files.internal("data/dead.wav"));
font = new BitmapFont(Gdx.files.internal("data/text.fnt"));
font.setScale(.25f, -.25f);
shadow = new BitmapFont(Gdx.files.internal("data/shadow.fnt"));
shadow.setScale(.25f, -.25f);
fontSmall = new BitmapFont(Gdx.files.internal("data/text.fnt"));
fontSmall.setScale(.10f, -.10f);
prefs = Gdx.app.getPreferences("Maze");
}