diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-15 17:25:41 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-15 17:25:41 +0200 |
commit | c94300644327a20a9e34790df4e5aa36ec74f9fb (patch) | |
tree | 02e59267fe6107d7bf31317c994ee391127da276 /core/src/ch/asynk | |
parent | 76f7f3d377279d3d2a72cf5985e028e2a6cfdf9c (diff) | |
download | RustAndDust-c94300644327a20a9e34790df4e5aa36ec74f9fb.zip RustAndDust-c94300644327a20a9e34790df4e5aa36ec74f9fb.tar.gz |
Hud: add Msg
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Hud.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hud.java b/core/src/ch/asynk/tankontank/game/Hud.java index e50396d..381f7a6 100644 --- a/core/src/ch/asynk/tankontank/game/Hud.java +++ b/core/src/ch/asynk/tankontank/game/Hud.java @@ -10,8 +10,9 @@ import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.math.Rectangle; import ch.asynk.tankontank.engine.gfx.Image; -import ch.asynk.tankontank.game.hud.Button; import ch.asynk.tankontank.game.hud.Bg; +import ch.asynk.tankontank.game.hud.Button; +import ch.asynk.tankontank.game.hud.Msg; import ch.asynk.tankontank.TankOnTank; @@ -33,9 +34,9 @@ public class Hud implements Disposable public Button cancelBtn; private Button btn; + private Msg msg; private Rectangle infoRect; - private float elapsed; private Vector2 bottomLeft; public Hud(final Ctrl ctrl, final TankOnTank game) @@ -54,6 +55,7 @@ public class Hud implements Disposable cancelBtn = new Button(atlas, "btn-cancel"); bg = new Bg(atlas.findRegion("disabled")); + msg = new Msg(game.skin.getFont("default-font"), atlas.findRegion("disabled")); updatePlayer(); @@ -63,8 +65,7 @@ public class Hud implements Disposable // - Turn infoRect = new Rectangle(flag.getX(), flag.getY(), flag.getWidth(), flag.getHeight()); - - elapsed = 0f; + msg.write("YO! It's hello_world Bitch !", 200, 200, 2, 10); } @Override @@ -77,10 +78,12 @@ public class Hud implements Disposable checkBtn.dispose(); cancelBtn.dispose(); bg.dispose(); + msg.dispose(); } public void animate(float delta) { + msg.animate(delta); } public void draw(Batch batch) @@ -93,6 +96,7 @@ public class Hud implements Disposable if (attackBtn.visible) attackBtn.getImage().draw(batch); if (checkBtn.visible) checkBtn.getImage().draw(batch); if (cancelBtn.visible) cancelBtn.getImage().draw(batch); + msg.draw(batch); } public void updatePlayer() |