本文整理汇总了Java中com.badlogic.gdx.assets.loaders.SkinLoader类的典型用法代码示例。如果您正苦于以下问题:Java SkinLoader类的具体用法?Java SkinLoader怎么用?Java SkinLoader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SkinLoader类属于com.badlogic.gdx.assets.loaders包,在下文中一共展示了SkinLoader类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onFinishedLoading
import com.badlogic.gdx.assets.loaders.SkinLoader; //导入依赖的package包/类
private void onFinishedLoading() {
BitmapFont main19Font = assetManager.get(MAIN_FONT_19_PATH());
BitmapFont main22Font = assetManager.get(MAIN_FONT_22_PATH());
BitmapFont letter20Font = assetManager.get(LETTER_FONT_20_PATH());
BitmapFont handwritten20Font = assetManager
.get(HANDWRITTEN_FONT_20_PATH());
ObjectMap<String, Object> fontMap = new ObjectMap<String, Object>();
fontMap.put("main-19", main19Font);
fontMap.put("main-22", main22Font);
fontMap.put("letter-20", letter20Font);
fontMap.put("handwritten-20", handwritten20Font);
assetManager.load(SKIN_PATH, Skin.class,
new SkinLoader.SkinParameter(SKIN_TEXTURE_ATLAS_PATH, fontMap));
assetManager.finishLoadingAsset(SKIN_PATH);
// game.setUISkin(assetManager.get(SKIN_PATH));
VisUI.load();
game.setUISkin(VisUI.getSkin());
// Notify loaded screens
game.getScreen("serverBrowser").finishLoading();
game.pushScreen("mainMenu");
}
开发者ID:eskalon,项目名称:ProjektGG,代码行数:26,代码来源:LoadingScreen.java
示例2: init
import com.badlogic.gdx.assets.loaders.SkinLoader; //导入依赖的package包/类
public void init() {
/*************** ASSET MANAGER ********************/
assetManager.load("data/gui.json", Skin.class, new SkinLoader.SkinParameter(guiAtlas));
assetManager.load(gameAtlas, TextureAtlas.class);
assetManager.load("data/mental-space", I18NBundle.class, new I18NBundleLoader.I18NBundleParameter(java.util.Locale.getDefault()));
/**************** Load Sounds and music *******************/
SoundManager.getInstance().loadBasicSounds();
MusicManager.getInstance().init(this);
MusicManager.getInstance().loadBasics();
/**************** Finish ******************/
this.finishLoading();
this.loadParticles();
}
开发者ID:unlimitedggames,项目名称:gdxjam-ugg,代码行数:18,代码来源:LoaderUtils.java
示例3: AssetManager
import com.badlogic.gdx.assets.loaders.SkinLoader; //导入依赖的package包/类
/** Creates a new AssetManager with all default loaders. */
public AssetManager (FileHandleResolver resolver) {
setLoader(BitmapFont.class, new BitmapFontLoader(resolver));
setLoader(Music.class, new MusicLoader(resolver));
setLoader(Pixmap.class, new PixmapLoader(resolver));
setLoader(Sound.class, new SoundLoader(resolver));
setLoader(TextureAtlas.class, new TextureAtlasLoader(resolver));
setLoader(Texture.class, new TextureLoader(resolver));
setLoader(Skin.class, new SkinLoader(resolver));
setLoader(ParticleEffect.class, new ParticleEffectLoader(resolver));
setLoader(PolygonRegion.class, new PolygonRegionLoader(resolver));
setLoader(I18NBundle.class, new I18NBundleLoader(resolver));
setLoader(Model.class, ".g3dj", new G3dModelLoader(new JsonReader(), resolver));
setLoader(Model.class, ".g3db", new G3dModelLoader(new UBJsonReader(), resolver));
setLoader(Model.class, ".obj", new ObjLoader(resolver));
executor = new AsyncExecutor(1);
}
开发者ID:basherone,项目名称:libgdxcn,代码行数:18,代码来源:AssetManager.java
示例4: match
import com.badlogic.gdx.assets.loaders.SkinLoader; //导入依赖的package包/类
@Override
public boolean match(FileHandle file) {
//find the same name of the skin and subfix is png
String texturePath = file.parent().path().replace("\\", "/");
if(texturePath.endsWith("/")){
texturePath += file.nameWithoutExtension()+".atlas";
}else{
texturePath += ("/"+file.nameWithoutExtension()+".atlas");
}
boolean result = file.extension().equals("json") && file.path().contains("skin");
if(result) Engine.getAssetManager().load(file.path().replace("\\", "/"),Skin.class,new SkinLoader.SkinParameter(texturePath));
return result;
}
开发者ID:lycying,项目名称:c2d-engine,代码行数:14,代码来源:RuleSkin.java
示例5: TitleScreen
import com.badlogic.gdx.assets.loaders.SkinLoader; //导入依赖的package包/类
public TitleScreen(Sokobug myGame) {
game = myGame;
readyToSkip = false;
TextureParameter param = new TextureParameter();
param.minFilter = TextureFilter.Linear;
param.magFilter = TextureFilter.Linear;
game.assetManager.load(Resources.BACKGROUNDS_TITLE.getPath(), Texture.class, param);
game.assetManager.finishLoading();
titleImage = new Sprite(game.assetManager.get(Resources.BACKGROUNDS_TITLE.getPath(), Texture.class));
titleImage.setPosition(0.f, 0.f);
pasedTimeCounter = 0.0f;
titleScreenMinDuration = 3.5f;
game.assetManager.load(Resources.FONTS_JAPONESA24.getPath(), BitmapFont.class);
game.assetManager.load(Resources.FONTS_JAPONESA32.getPath(), BitmapFont.class);
game.assetManager.load(Resources.FONTS_JAPONESA60.getPath(), BitmapFont.class);
game.assetManager.load(Resources.FONTS_JAPONESA120.getPath(), BitmapFont.class);
game.assetManager.load(Resources.UI_BUTTONS_PACK.getPath(), TextureAtlas.class);
game.assetManager.load(Resources.UI_BUTTONS_JSON.getPath(), Skin.class, new SkinLoader.SkinParameter(
Resources.UI_BUTTONS_PACK.getPath()));
game.assetManager.load(Resources.BACKGROUNDS_MENU.getPath(), Texture.class, param);
game.assetManager.load(Resources.BACKGROUNDS_POTATOES.getPath(), Texture.class, param);
game.assetManager.load(Resources.ANIMATIONS_PACK_BUG.getPath(), TextureAtlas.class);
game.assetManager.load(Resources.ANIMATIONS_PACK_SPOTGLOW.getPath(), TextureAtlas.class);
game.assetManager.load(Resources.ANIMATIONS_PACK_VICTORYGLOW.getPath(), TextureAtlas.class);
game.assetManager.load(Resources.TILES_SARCOPHAGUS.getPath(), Texture.class, param);
game.assetManager.load(Resources.TILES_WALL.getPath(), Texture.class, param);
game.assetManager.load(Resources.TILES_FREE.getPath(), Texture.class, param);
game.assetManager.load(Resources.TILES_SPOTON.getPath(), Texture.class, param);
game.assetManager.load(Resources.TILES_SPOTOFF.getPath(), Texture.class, param);
game.assetManager.load(Resources.METAITEMS_TOPBAR.getPath(), Texture.class, param);
game.assetManager.load(Resources.METAITEMS_PAD.getPath(), Texture.class, param);
game.assetManager.load(Resources.METAITEMS_VICTORYWING.getPath(), Texture.class, param);
game.assetManager.load(Resources.LABELS_FINISH.getPath(), Texture.class, param);
game.assetManager.load(Resources.SOUND_BUGMOVE.getPath(), Sound.class);
game.assetManager.load(Resources.SOUND_BUTTONCLICK.getPath(), Sound.class);
game.assetManager.load(Resources.SOUND_SARCOPHAGUSMOVE.getPath(), Sound.class);
game.assetManager.load(Resources.SOUND_VICTORY.getPath(), Sound.class);
}
开发者ID:bogdanguranda,项目名称:sokobug,代码行数:50,代码来源:TitleScreen.java
注:本文中的com.badlogic.gdx.assets.loaders.SkinLoader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论