summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/gdx/tabletop/Assets.java
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2018-09-15 15:38:09 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2018-09-15 15:38:09 +0200
commit57cddbf4b79b6c342e53acfa804d01f94d9bd266 (patch)
tree9fcc89fecc3166ff19a7ab90b14f1a4111903df4 /core/src/ch/asynk/gdx/tabletop/Assets.java
parent898a7c34189e2b7d52c794c93e9fa0aeb759ca64 (diff)
downloadgdx-boardgame-57cddbf4b79b6c342e53acfa804d01f94d9bd266.zip
gdx-boardgame-57cddbf4b79b6c342e53acfa804d01f94d9bd266.tar.gz
namespecat gdx.board -> gdx.tabletop
Diffstat (limited to 'core/src/ch/asynk/gdx/tabletop/Assets.java')
-rw-r--r--core/src/ch/asynk/gdx/tabletop/Assets.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/core/src/ch/asynk/gdx/tabletop/Assets.java b/core/src/ch/asynk/gdx/tabletop/Assets.java
new file mode 100644
index 0000000..4b4382d
--- /dev/null
+++ b/core/src/ch/asynk/gdx/tabletop/Assets.java
@@ -0,0 +1,30 @@
+package ch.asynk.gdx.tabletop;
+
+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);
+ }
+}