Dim dead ship sprite instead of removing it
This commit is contained in:
parent
356486c6ce
commit
337bb5c74f
|
@ -84,11 +84,10 @@ module SpaceTac.View {
|
|||
}
|
||||
|
||||
// Remove a ship sprite
|
||||
removeShip(ship: Game.Ship): void {
|
||||
markAsDead(ship: Game.Ship): void {
|
||||
var sprite = this.findShipSprite(ship);
|
||||
if (sprite) {
|
||||
this.ship_sprites.splice(this.ship_sprites.indexOf(sprite), 1);
|
||||
sprite.destroy();
|
||||
sprite.alpha = 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -106,8 +106,8 @@ module SpaceTac.View {
|
|||
if (this.view.ship_hovered === event.ship) {
|
||||
this.view.setShipHovered(null);
|
||||
}
|
||||
this.view.arena.removeShip(event.ship);
|
||||
this.view.ship_list.removeShip(event.ship);
|
||||
this.view.arena.markAsDead(event.ship);
|
||||
this.view.ship_list.markAsDead(event.ship);
|
||||
}
|
||||
|
||||
// Weapon used
|
||||
|
|
|
@ -92,13 +92,11 @@ module SpaceTac.View {
|
|||
}
|
||||
|
||||
// Remove a ship from the list
|
||||
removeShip(ship: Game.Ship): void {
|
||||
markAsDead(ship: Game.Ship): void {
|
||||
var item = this.findItem(ship);
|
||||
if (item) {
|
||||
this.ships.splice(this.ships.indexOf(item), 1);
|
||||
item.destroy();
|
||||
item.alpha = 0.5;
|
||||
}
|
||||
this.updateItemsLocation();
|
||||
}
|
||||
|
||||
// Set the currently playing ship
|
||||
|
|
Loading…
Reference in a new issue