summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2019-12-17 18:45:57 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2019-12-17 18:45:57 +0100
commite4800bc967a9f320cd4704db0c061d9db562cb74 (patch)
tree3c9a5b48054a2306ee0bf0abb9c88114c7709f8a /core/src/ch/asynk
parent5d809c28ea2b6a5779a512aeef09308006670284 (diff)
downloadgdx-boardgame-e4800bc967a9f320cd4704db0c061d9db562cb74.zip
gdx-boardgame-e4800bc967a9f320cd4704db0c061d9db562cb74.tar.gz
core:Assets : add getTextureRegion()
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/gdx/boardgame/Assets.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/Assets.java b/core/src/ch/asynk/gdx/boardgame/Assets.java
index d065d76..690c547 100644
--- a/core/src/ch/asynk/gdx/boardgame/Assets.java
+++ b/core/src/ch/asynk/gdx/boardgame/Assets.java
@@ -6,6 +6,7 @@ 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;
+import com.badlogic.gdx.graphics.g2d.TextureRegion;
public class Assets extends AssetManager
{
@@ -14,6 +15,11 @@ public class Assets extends AssetManager
return get(assetName, Texture.class);
}
+ public TextureRegion getTextureRegion(String assetName)
+ {
+ return new TextureRegion(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);