diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2018-12-07 00:55:50 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2018-12-07 00:55:50 +0100 |
commit | dea17357ce5140efa52b7eec514a50bfc266b87d (patch) | |
tree | 62a5022036e6b90f412eefa0355cf2788d09e095 /test/src/ch/asynk/gdx | |
parent | 3d5471cc3a2cf6cd5341475b3549c804449d623d (diff) | |
download | gdx-boardgame-dea17357ce5140efa52b7eec514a50bfc266b87d.zip gdx-boardgame-dea17357ce5140efa52b7eec514a50bfc266b87d.tar.gz |
AnimationScreen : test looping sound in MoveAnimation
Diffstat (limited to 'test/src/ch/asynk/gdx')
-rw-r--r-- | test/src/ch/asynk/gdx/boardgame/test/AnimationsScreen.java | 2 | ||||
-rw-r--r-- | test/src/ch/asynk/gdx/boardgame/test/Assets.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/test/src/ch/asynk/gdx/boardgame/test/AnimationsScreen.java b/test/src/ch/asynk/gdx/boardgame/test/AnimationsScreen.java index 372a406..1d913c6 100644 --- a/test/src/ch/asynk/gdx/boardgame/test/AnimationsScreen.java +++ b/test/src/ch/asynk/gdx/boardgame/test/AnimationsScreen.java @@ -71,7 +71,7 @@ public class AnimationsScreen extends AbstractScreen animations = AnimationSequence.obtain(10); animations.add(BounceAnimation.obtain(panzer, 2f, 3f, -1)); animations.add(DelayAnimation.obtain(1f)); - animations.add(MoveAnimation.obtain(panzer, path, 2f, (p,path) -> { + animations.add(MoveAnimation.obtain(panzer, path, 2f, app.assets.getSound(app.assets.TANK_MOVE_SND), (p,path) -> { Tile from = path.from(); Tile to = path.to(); System.err.println(String.format("%s -> %s", from, to)); diff --git a/test/src/ch/asynk/gdx/boardgame/test/Assets.java b/test/src/ch/asynk/gdx/boardgame/test/Assets.java index deda5b7..74958a3 100644 --- a/test/src/ch/asynk/gdx/boardgame/test/Assets.java +++ b/test/src/ch/asynk/gdx/boardgame/test/Assets.java @@ -25,6 +25,7 @@ public class Assets extends ch.asynk.gdx.boardgame.Assets public static final String PATCH = "ui-patch.png"; public static final String PANZER = "panzer.png"; public static final String HEX_OVERLAYS = "hex-overlays.atlas"; + public static final String TANK_MOVE_SND = "tank_move.ogg"; public static final String SHELL_FIRE = "shell_fire.png"; public static final String SHELL_FIRE_SND = "shell_fire.ogg"; public static final String EXPLOSIONS = "explosions.png"; @@ -83,6 +84,7 @@ public class Assets extends ch.asynk.gdx.boardgame.Assets load(EXPLOSION_SND, Sound.class); load(DICE, Texture.class); load(DICE_SND, Sound.class); + load(TANK_MOVE_SND, Sound.class); } public void unloadApp() @@ -102,5 +104,6 @@ public class Assets extends ch.asynk.gdx.boardgame.Assets unload(EXPLOSION_SND); unload(DICE); unload(DICE_SND); + unload(TANK_MOVE_SND); } } |