本文整理汇总了Java中com.badlogic.gdx.assets.loaders.BitmapFontLoader.BitmapFontParameter类的典型用法代码示例。如果您正苦于以下问题:Java BitmapFontParameter类的具体用法?Java BitmapFontParameter怎么用?Java BitmapFontParameter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BitmapFontParameter类属于com.badlogic.gdx.assets.loaders.BitmapFontLoader包,在下文中一共展示了BitmapFontParameter类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: create
import com.badlogic.gdx.assets.loaders.BitmapFontLoader.BitmapFontParameter; //导入依赖的package包/类
@Override
public void create () {
this.batch = new SpriteBatch();
this.assets = new AssetManager();
BitmapFontParameter params = new BitmapFontParameter();
params.atlasName = ATLAS;
this.assets.load(FONT_1, BitmapFont.class, params);
this.assets.load(FONT_2, BitmapFont.class, params);
this.assets.load(FONT_3, BitmapFont.class, params);
this.assets.finishLoading();
this.fonts = new BitmapFont[3];
this.fonts[0] = assets.get(FONT_1);
this.fonts[1] = assets.get(FONT_2);
this.fonts[2] = assets.get(FONT_3);
this.fonts[0].setColor(Color.RED);
this.fonts[1].setColor(Color.BLUE);
this.fonts[2].setColor(Color.GREEN);
this.testStrings = new String[] {"I'm loaded from an atlas!", "I, too, am loaded from an atlas", "I'm with stupid ^"};
Gdx.gl.glClearColor(1, 1, 1, 1);
}
开发者ID:basherone,项目名称:libgdxcn,代码行数:26,代码来源:BitmapFontAtlasRegionTest.java
示例2: loadFonts
import com.badlogic.gdx.assets.loaders.BitmapFontLoader.BitmapFontParameter; //导入依赖的package包/类
private static void loadFonts(final String atlasPath, final String[] fontPaths, final AssetService assetService) {
if (fontPaths.length != 0) {
final BitmapFontParameter loadingParameters = new BitmapFontParameter();
loadingParameters.atlasName = atlasPath;
for (final String fontPath : fontPaths) {
assetService.finishLoading(fontPath, BitmapFont.class, loadingParameters);
}
}
}
开发者ID:gdx-libs,项目名称:gdx-autumn-mvc,代码行数:10,代码来源:SkinService.java
示例3: loadAssetLists
import com.badlogic.gdx.assets.loaders.BitmapFontLoader.BitmapFontParameter; //导入依赖的package包/类
private void loadAssetLists() {
TextureParameter param = new TextureParameter();
param.minFilter = param.magFilter = Texture.TextureFilter.Linear;
assetManager.loadAssetList("data/json/images.json", Texture.class, param);
assetManager.loadAssetList("data/json/sounds.json", Sound.class, null);
assetManager.loadAssetList("data/json/music.json", Music.class, null);
assetManager.loadAssetListWithParam("data/json/animations.json", AnimationExtended.class,
AnimationExtendedLoader.AnimationExtendedParameter.class);
BitmapFontParameter fontParam = new BitmapFontParameter();
fontParam.flip = true;
assetManager.loadAssetList("data/json/fonts.json", BitmapFont.class, fontParam);
}
开发者ID:GameDevWeek,项目名称:CodeBase,代码行数:14,代码来源:Main.java
示例4: loadSync
import com.badlogic.gdx.assets.loaders.BitmapFontLoader.BitmapFontParameter; //导入依赖的package包/类
@Override
public BitmapFont loadSync( AssetManager manager, String fileName, FileHandle file, BitmapFontParameter parameter ) {
int fontSize = 10;
String scrubbedFileName = fileName;
int qMark = fileName.lastIndexOf( "?" );
if ( qMark != -1 ) {
scrubbedFileName = scrubbedFileName.substring( 0, qMark );
Matcher m = argsPtn.matcher( fileName );
m.region( qMark+1, fileName.length() );
while ( m.lookingAt() ) {
if ( m.group( 1 ).equals( "size" ) ) {
fontSize = Integer.parseInt( m.group( 2 ) );
}
if ( m.group( 3 ).length() > 0 ) break; // Hit the "#" separator.
m.region( m.end(), fileName.length() );
}
}
boolean flip = parameter != null ? parameter.flip : false;
FreeTypeFontGenerator generator = new FreeTypeFontGenerator( file );
FreeTypeBitmapFontData data = generator.generateData( fontSize, FreeTypeFontGenerator.DEFAULT_CHARS, flip );
generator.dispose();
return new BitmapFont( data, data.getTextureRegions(), true );
}
开发者ID:Vhati,项目名称:OverdriveGDX,代码行数:30,代码来源:FreeTypeFontLoader.java
示例5: loadFont
import com.badlogic.gdx.assets.loaders.BitmapFontLoader.BitmapFontParameter; //导入依赖的package包/类
public void loadFont(String name, String atlas) {
BitmapFontParameter bfp = new BitmapFontParameter();
bfp.atlasName = atlas;
assets.load(name, BitmapFont.class, bfp);
}
开发者ID:kyperbelt,项目名称:KyperBox,代码行数:6,代码来源:KyperBoxGame.java
示例6: BmpFontAsset
import com.badlogic.gdx.assets.loaders.BitmapFontLoader.BitmapFontParameter; //导入依赖的package包/类
public BmpFontAsset (String relativePath, BitmapFontParameter fontParameter) {
super(relativePath);
this.fontParameter = fontParameter;
}
开发者ID:kotcrab,项目名称:vis-editor,代码行数:5,代码来源:BmpFontAsset.java
示例7: getFontParameter
import com.badlogic.gdx.assets.loaders.BitmapFontLoader.BitmapFontParameter; //导入依赖的package包/类
public BitmapFontParameter getFontParameter () {
return fontParameter;
}
开发者ID:kotcrab,项目名称:vis-editor,代码行数:4,代码来源:BmpFontAsset.java
示例8: loadAsync
import com.badlogic.gdx.assets.loaders.BitmapFontLoader.BitmapFontParameter; //导入依赖的package包/类
@Override
public void loadAsync( AssetManager manager, String fileName, FileHandle file, BitmapFontParameter parameter ) {
// No-op.
}
开发者ID:Vhati,项目名称:OverdriveGDX,代码行数:5,代码来源:FreeTypeFontLoader.java
示例9: getDependencies
import com.badlogic.gdx.assets.loaders.BitmapFontLoader.BitmapFontParameter; //导入依赖的package包/类
@Override
public Array<AssetDescriptor> getDependencies( String fileName, FileHandle file, BitmapFontParameter parameter ) {
return new Array<AssetDescriptor>();
}
开发者ID:Vhati,项目名称:OverdriveGDX,代码行数:5,代码来源:FreeTypeFontLoader.java
注:本文中的com.badlogic.gdx.assets.loaders.BitmapFontLoader.BitmapFontParameter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论