summaryrefslogtreecommitdiff
path: root/core/src/com/ilotterytea/maxoning/anim
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/com/ilotterytea/maxoning/anim')
-rw-r--r--core/src/com/ilotterytea/maxoning/anim/SpriteUtils.java31
1 files changed, 0 insertions, 31 deletions
diff --git a/core/src/com/ilotterytea/maxoning/anim/SpriteUtils.java b/core/src/com/ilotterytea/maxoning/anim/SpriteUtils.java
deleted file mode 100644
index c68edd8..0000000
--- a/core/src/com/ilotterytea/maxoning/anim/SpriteUtils.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.ilotterytea.maxoning.anim;
-
-import com.badlogic.gdx.graphics.Texture;
-import com.badlogic.gdx.graphics.g2d.TextureRegion;
-
-import java.util.Arrays;
-
-public class SpriteUtils {
- public static TextureRegion[] splitToTextureRegions(
- Texture texture,
- int tileWidth,
- int tileHeight,
- int columns,
- int rows
- ) {
- TextureRegion[][] tmp = TextureRegion.split(texture, tileWidth, tileHeight);
- TextureRegion[] frames = new TextureRegion[(texture.getWidth() / columns) + (texture.getHeight() / rows)];
-
- int index = 0;
-
- for (TextureRegion[] regArray : tmp) {
- for (TextureRegion reg : regArray) {
- if (reg != null) {
- frames[index++] = reg;
- }
- }
- }
-
- return frames;
- }
-}