summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/loading
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-07-19 13:20:33 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2015-07-19 13:20:33 +0200
commitde0463bcf0f76ef8b07f2719679c9e0d72745c5d (patch)
tree9a33df947ceeea16a3e20b400585b1d3c304e77e /core/src/ch/asynk/rustanddust/loading
parente66f9f2a61d3dab4545e996046486de0d44e2901 (diff)
downloadRustAndDust-de0463bcf0f76ef8b07f2719679c9e0d72745c5d.zip
RustAndDust-de0463bcf0f76ef8b07f2719679c9e0d72745c5d.tar.gz
welcome RustAndDust
Diffstat (limited to 'core/src/ch/asynk/rustanddust/loading')
-rw-r--r--core/src/ch/asynk/rustanddust/loading/LoadingBar.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/loading/LoadingBar.java b/core/src/ch/asynk/rustanddust/loading/LoadingBar.java
new file mode 100644
index 0000000..5a6181a
--- /dev/null
+++ b/core/src/ch/asynk/rustanddust/loading/LoadingBar.java
@@ -0,0 +1,32 @@
+package ch.asynk.rustanddust.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());
+ }
+}