1
0
Fork 0

Fixed weapon effect not using audio manager

This commit is contained in:
Michaël Lemaire 2015-04-22 23:53:13 +02:00
parent 2e962ca301
commit 8e49ca6dfc
2 changed files with 6 additions and 1 deletions

View file

@ -77,6 +77,11 @@ module SpaceTac.View {
});
}
// Get the current GameUI instance
getGame(): GameUI {
return this.battleview.gameui;
}
// Remove a ship sprite
removeShip(ship: Game.Ship): void {
var sprite = this.findShipSprite(ship);

View file

@ -69,7 +69,7 @@ module SpaceTac.View {
// Submachine gun effect (small chain of bullets)
private gunEffect(): void {
this.arena.game.sound.play("battle-weapon-bullets");
this.arena.getGame().audio.playOnce("battle-weapon-bullets");
var source = this.arena.toGlobal(new PIXI.Point(this.source.x, this.source.y));
var destination = this.arena.toGlobal(new PIXI.Point(this.destination.x, this.destination.y));