diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2015-01-02 14:34:00 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2015-01-02 14:34:00 +0100 |
commit | 1f1f09ec168fb057c8eacf52bb7124f736cfe41d (patch) | |
tree | b29f461f9ab7b230bf87d145c57b36ce44e3c76c /core/src/ch/asynk/tankontank/game | |
parent | a97d1970b435f5a9de5ba9fcec48619140a0ad29 (diff) | |
download | RustAndDust-1f1f09ec168fb057c8eacf52bb7124f736cfe41d.zip RustAndDust-1f1f09ec168fb057c8eacf52bb7124f736cfe41d.tar.gz |
add infantry_move.mp3
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java index 2cd2f71..fa47423 100644 --- a/core/src/ch/asynk/tankontank/game/Map.java +++ b/core/src/ch/asynk/tankontank/game/Map.java @@ -47,7 +47,8 @@ public abstract class Map extends Board public final Meteorology meteorology; private final DestroyAnimation destroy; - private final Sound moveSound; + private final Sound tankMoveSound; + private final Sound infantryMoveSound; private Sound sound; private long soundId = -1; private Animation animationClosure; @@ -102,7 +103,8 @@ public abstract class Map extends Board new SelectedTile(game.manager.get("data/hex.png", Texture.class), new float[] {.2f, .1f, .1f, .1f, .2f, .1f} )); this.ctrl = game.ctrl; this.destroy = new DestroyAnimation(); - this.moveSound = game.manager.get("sounds/move.mp3", Sound.class); + this.tankMoveSound = game.manager.get("sounds/tank_move.mp3", Sound.class); + this.infantryMoveSound = game.manager.get("sounds/infantry_move.mp3", Sound.class); DiceAnimation.init(game.manager.get("data/dice.png", Texture.class), 16, 9, game.manager.get("sounds/dice.mp3", Sound.class)); PromoteAnimation.init(game.manager.get("data/hud.atlas", TextureAtlas.class), game.manager.get("sounds/promote.mp3", Sound.class)); FireAnimation.init( @@ -138,7 +140,6 @@ public abstract class Map extends Board { super.dispose(); clearAll(); - moveSound.dispose(); destroy.dispose(); DiceAnimation.free(); PromoteAnimation.free(); @@ -337,7 +338,10 @@ public abstract class Map extends Board { moveableUnits.remove(unit); activatedUnits.add(unit); - sound = moveSound; + if (unit.isA(Unit.UnitType.INFANTRY)) + sound = infantryMoveSound; + else + sound = tankMoveSound; soundId = sound.play(ctrl.cfg.fxVolume); return moveableUnits.size(); } |