summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--assets/data/tank_move.oggbin0 -> 41197 bytes
-rw-r--r--test/src/ch/asynk/gdx/boardgame/test/AnimationsScreen.java2
-rw-r--r--test/src/ch/asynk/gdx/boardgame/test/Assets.java3
3 files changed, 4 insertions, 1 deletions
diff --git a/assets/data/tank_move.ogg b/assets/data/tank_move.ogg
new file mode 100644
index 0000000..698cef0
--- /dev/null
+++ b/assets/data/tank_move.ogg
Binary files differ
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);
}
}