Fixed a bug when hovered ship died
This commit is contained in:
parent
0d5f748386
commit
7236afe74b
|
@ -101,6 +101,9 @@ module SpaceTac.View {
|
|||
|
||||
// A ship died
|
||||
private processDeathEvent(event: Game.DeathEvent): void {
|
||||
if (this.view.ship_hovered === event.ship) {
|
||||
this.view.setShipHovered(null);
|
||||
}
|
||||
this.view.arena.removeShip(event.ship);
|
||||
this.view.ship_list.removeShip(event.ship);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue