summaryrefslogtreecommitdiff
path: root/core/src/com/ilotterytea/maxoning/anim
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2022-08-29 00:40:49 +0600
committerilotterytea <iltsu@alright.party>2022-08-29 00:40:49 +0600
commit42f5238c3341437e9d55f14715033b03aad60fc8 (patch)
treeca0b1c69688f0042fb4c6c4da0f1ab57aac462a1 /core/src/com/ilotterytea/maxoning/anim
parent5ce75c990a9f7b77a5c52afb565b3ba92a07593a (diff)
важное переименовывание папок
Diffstat (limited to 'core/src/com/ilotterytea/maxoning/anim')
-rw-r--r--core/src/com/ilotterytea/maxoning/anim/AnimatedImage.java38
1 files changed, 0 insertions, 38 deletions
diff --git a/core/src/com/ilotterytea/maxoning/anim/AnimatedImage.java b/core/src/com/ilotterytea/maxoning/anim/AnimatedImage.java
deleted file mode 100644
index 8da1c19..0000000
--- a/core/src/com/ilotterytea/maxoning/anim/AnimatedImage.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.ilotterytea.maxoning.anim;
-
-import com.badlogic.gdx.graphics.g2d.Animation;
-import com.badlogic.gdx.graphics.g2d.TextureRegion;
-import com.badlogic.gdx.scenes.scene2d.ui.Image;
-import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
-
-public class AnimatedImage extends Image {
- private float stateTime = 0;
- private final TextureRegion[] regions;
- private int index = 0;
-
- public AnimatedImage(TextureRegion[] regions) {
- super(regions[0]);
- this.regions = regions;
- }
-
- @Override public void act(float delta) {
- if (index > regions.length - 1) {
- index = 0;
- }
- if (regions[index + 1] == null) {
- index = 0;
- }
- super.setDrawable(new TextureRegionDrawable(regions[index]));
- index++;
- super.act(delta);
-
- }
-
- public void dispose() {
- for (TextureRegion reg : regions) {
- if (reg != null) {
- reg.getTexture().dispose();
- }
- }
- }
-}