From 42f5238c3341437e9d55f14715033b03aad60fc8 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Mon, 29 Aug 2022 00:40:49 +0600 Subject: важное переименовывание папок MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ilotterytea/maxoning/anim/AnimatedImage.java | 38 ---------------------- 1 file changed, 38 deletions(-) delete mode 100644 core/src/com/ilotterytea/maxoning/anim/AnimatedImage.java (limited to 'core/src/com/ilotterytea/maxoning/anim') 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(); - } - } - } -} -- cgit v1.2.3