From 6345498cd965be39b24aebe3f4f2672eff2057d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 16 Sep 2014 11:27:23 +0200 Subject: actors/LoadingBar -> loading/LoadingBar --- .../src/ch/asynk/tankontank/actors/LoadingBar.java | 32 ---------------------- .../ch/asynk/tankontank/loading/LoadingBar.java | 32 ++++++++++++++++++++++ .../ch/asynk/tankontank/screens/LoadScreen.java | 2 +- 3 files changed, 33 insertions(+), 33 deletions(-) delete mode 100644 core/src/ch/asynk/tankontank/actors/LoadingBar.java create mode 100644 core/src/ch/asynk/tankontank/loading/LoadingBar.java diff --git a/core/src/ch/asynk/tankontank/actors/LoadingBar.java b/core/src/ch/asynk/tankontank/actors/LoadingBar.java deleted file mode 100644 index c8b138f..0000000 --- a/core/src/ch/asynk/tankontank/actors/LoadingBar.java +++ /dev/null @@ -1,32 +0,0 @@ -package ch.asynk.tankontank.actors; - -import com.badlogic.gdx.graphics.g2d.Animation; -import com.badlogic.gdx.graphics.g2d.Batch; -import com.badlogic.gdx.graphics.g2d.TextureRegion; -import com.badlogic.gdx.scenes.scene2d.Actor; - -public class LoadingBar extends Actor -{ - Animation animation; - TextureRegion reg; - float stateTime; - - public LoadingBar(Animation animation) - { - this.animation = animation; - reg = animation.getKeyFrame(0); - } - - @Override - public void act(float delta) - { - stateTime += delta; - reg = animation.getKeyFrame(stateTime); - } - - @Override - public void draw(Batch batch, float parentAlpha) - { - batch.draw(reg, getX(), getY()); - } -} diff --git a/core/src/ch/asynk/tankontank/loading/LoadingBar.java b/core/src/ch/asynk/tankontank/loading/LoadingBar.java new file mode 100644 index 0000000..2b14713 --- /dev/null +++ b/core/src/ch/asynk/tankontank/loading/LoadingBar.java @@ -0,0 +1,32 @@ +package ch.asynk.tankontank.loading; + +import com.badlogic.gdx.graphics.g2d.Animation; +import com.badlogic.gdx.graphics.g2d.Batch; +import com.badlogic.gdx.graphics.g2d.TextureRegion; +import com.badlogic.gdx.scenes.scene2d.Actor; + +public class LoadingBar extends Actor +{ + Animation animation; + TextureRegion reg; + float stateTime; + + public LoadingBar(Animation animation) + { + this.animation = animation; + reg = animation.getKeyFrame(0); + } + + @Override + public void act(float delta) + { + stateTime += delta; + reg = animation.getKeyFrame(stateTime); + } + + @Override + public void draw(Batch batch, float parentAlpha) + { + batch.draw(reg, getX(), getY()); + } +} diff --git a/core/src/ch/asynk/tankontank/screens/LoadScreen.java b/core/src/ch/asynk/tankontank/screens/LoadScreen.java index 5cef26a..ef0de5f 100644 --- a/core/src/ch/asynk/tankontank/screens/LoadScreen.java +++ b/core/src/ch/asynk/tankontank/screens/LoadScreen.java @@ -12,7 +12,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Image; import com.badlogic.gdx.utils.viewport.FitViewport; import ch.asynk.tankontank.TankOnTank; -import ch.asynk.tankontank.actors.LoadingBar; +import ch.asynk.tankontank.loading.LoadingBar; public class LoadScreen extends AbstractScreen { -- cgit v1.1-2-g2b99