Skip to content

Commit

Permalink
fix enemy mech display between fights
Browse files Browse the repository at this point in the history
  • Loading branch information
seleb committed Jul 14, 2024
1 parent 43f6107 commit fe77e23
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/GameScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,6 @@ export class GameScene {
await this.fight();
await this.scenePostfight();
do {
this.battleGrid = [];
this.battleGridEnemy = [];
await this.scenePrebuild();
await this.buildMech();
await this.scenePrefight();
Expand Down Expand Up @@ -428,6 +426,8 @@ export class GameScene {
}

scenePrebuild() {
this.battleGrid = [];
this.battleGridEnemy = [];
this.setFocus(-size.x);
this.strand.goto(`${this.strand.next} prebuild`);
return this.waitForClose();
Expand Down Expand Up @@ -1222,7 +1222,8 @@ ${lastModule.description}${
Math.max(size.x * (1 / 5), this.mechEnemy.container.width / 2) + 50
);
this.mechEnemy.container.y += size.y * 0.45;
this.mechEnemy.container.visible = this.battleGridEnemy.length > 0;
this.mechEnemy.container.visible = this.modulesEnemy.container.visible =
this.battleGridEnemy.length > 0;

this.modules.container.x = this.mech.container.x;
this.modules.container.y = this.mech.container.y;
Expand Down

0 comments on commit fe77e23

Please sign in to comment.