diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2019-12-17 18:45:57 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2019-12-17 18:45:57 +0100 |
commit | e4800bc967a9f320cd4704db0c061d9db562cb74 (patch) | |
tree | 3c9a5b48054a2306ee0bf0abb9c88114c7709f8a | |
parent | 5d809c28ea2b6a5779a512aeef09308006670284 (diff) | |
download | gdx-boardgame-e4800bc967a9f320cd4704db0c061d9db562cb74.zip gdx-boardgame-e4800bc967a9f320cd4704db0c061d9db562cb74.tar.gz |
core:Assets : add getTextureRegion()
-rw-r--r-- | core/src/ch/asynk/gdx/boardgame/Assets.java | 6 |
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); |