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