diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2018-09-13 12:19:49 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2018-09-13 12:19:49 +0200 |
commit | cba1b76339b2aa2c476d5e4c40cb330025c8a6da (patch) | |
tree | 53af50f15963c42c442aeb10f8b68a5e78b0b9ec /core/src/ch/asynk/zproject/engine/Assets.java | |
parent | fb31fdbca6537a9d23baeb038bd395b7f332c21c (diff) | |
download | gdx-boardgame-cba1b76339b2aa2c476d5e4c40cb330025c8a6da.zip gdx-boardgame-cba1b76339b2aa2c476d5e4c40cb330025c8a6da.tar.gz |
move some of Assets into engine/Assets
Diffstat (limited to 'core/src/ch/asynk/zproject/engine/Assets.java')
-rw-r--r-- | core/src/ch/asynk/zproject/engine/Assets.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/core/src/ch/asynk/zproject/engine/Assets.java b/core/src/ch/asynk/zproject/engine/Assets.java new file mode 100644 index 0000000..c5e9468 --- /dev/null +++ b/core/src/ch/asynk/zproject/engine/Assets.java @@ -0,0 +1,30 @@ +package ch.asynk.zproject.engine; + +import com.badlogic.gdx.assets.AssetManager; +import com.badlogic.gdx.graphics.Texture; +import com.badlogic.gdx.graphics.g2d.BitmapFont; +import com.badlogic.gdx.graphics.g2d.NinePatch; +import com.badlogic.gdx.graphics.g2d.TextureAtlas; + +public class Assets extends AssetManager +{ + public Texture getTexture(String assetName) + { + return get(assetName, Texture.class); + } + + public NinePatch getNinePatch(String assetName, int left, int right, int top, int bottom) + { + return new NinePatch(get(assetName, Texture.class), left, right, top, bottom); + } + + public TextureAtlas getAtlas(String assetName) + { + return get(assetName, TextureAtlas.class); + } + + public BitmapFont getFont(String assetName) + { + return get(assetName, BitmapFont.class); + } +} |