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 | |
parent | a97d1970b435f5a9de5ba9fcec48619140a0ad29 (diff) | |
download | RustAndDust-1f1f09ec168fb057c8eacf52bb7124f736cfe41d.zip RustAndDust-1f1f09ec168fb057c8eacf52bb7124f736cfe41d.tar.gz |
add infantry_move.mp3
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/tankontank/TankOnTank.java | 6 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Map.java | 12 |
2 files changed, 12 insertions, 6 deletions
diff --git a/core/src/ch/asynk/tankontank/TankOnTank.java b/core/src/ch/asynk/tankontank/TankOnTank.java index 20f600d..0d3ed9d 100644 --- a/core/src/ch/asynk/tankontank/TankOnTank.java +++ b/core/src/ch/asynk/tankontank/TankOnTank.java @@ -97,7 +97,8 @@ public class TankOnTank extends Game manager.load("data/tank_fire.png", Texture.class); manager.load("data/explosions.png", Texture.class); manager.load("sounds/dice.mp3", Sound.class); - manager.load("sounds/move.mp3", Sound.class); + manager.load("sounds/tank_move.mp3", Sound.class); + manager.load("sounds/infantry_move.mp3", Sound.class); manager.load("sounds/infantry_fire.mp3", Sound.class); manager.load("sounds/tank_fire.mp3", Sound.class); manager.load("sounds/tank_fire_short.mp3", Sound.class); @@ -123,7 +124,8 @@ public class TankOnTank extends Game manager.unload("data/tank_fire.png"); manager.unload("data/explosions.png"); manager.unload("sounds/dice.mp3"); - manager.unload("sounds/move.mp3"); + manager.unload("sounds/tank_move.mp3"); + manager.unload("sounds/infantry_move.mp3"); manager.unload("sounds/infantry_fire.mp3"); manager.unload("sounds/tank_fire.mp3"); manager.unload("sounds/tank_fire_short.mp3"); 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(); } |