diff --git a/src/app/view/battle/Arena.ts b/src/app/view/battle/Arena.ts index 1d8e73d..48b2ce8 100644 --- a/src/app/view/battle/Arena.ts +++ b/src/app/view/battle/Arena.ts @@ -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); diff --git a/src/app/view/battle/WeaponEffect.ts b/src/app/view/battle/WeaponEffect.ts index 190a42e..2d2d416 100644 --- a/src/app/view/battle/WeaponEffect.ts +++ b/src/app/view/battle/WeaponEffect.ts @@ -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));