From 7f9bfd147b8b4ecc1d0aac876daecc201c8d4bb0 Mon Sep 17 00:00:00 2001 From: Chris Weed Date: Thu, 18 Jul 2024 11:18:21 -0500 Subject: [PATCH] Fixed boat battle bug with no ending --- boatBattle.ts | 2 ++ main.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/boatBattle.ts b/boatBattle.ts index 41f63f2..a07601d 100644 --- a/boatBattle.ts +++ b/boatBattle.ts @@ -17,6 +17,7 @@ namespace BoatBattle { export function init() { scene.setBackgroundColor(6) scene.setBackgroundImage(assets.image`Boat Battle`) + enemies = [] _isDone = false // Spawn the players @@ -78,6 +79,7 @@ namespace BoatBattle { player1.destroy() player2.destroy() enemies.forEach((e) => e.destroy()) + enemies = [] treasure.destroy() scene.setBackgroundImage(assets.image`empty`) diff --git a/main.ts b/main.ts index 46e4105..e713c0c 100644 --- a/main.ts +++ b/main.ts @@ -35,7 +35,7 @@ const playerState = { currentIsland: '' } -const version: string = 'v1.0' +const version: string = 'v1.1' const debugMode: boolean = false let currentState: States