From a4462bfe9814c1eb5207f631f05529b00183ca49 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Wed, 26 Jul 2023 18:09:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/graphics/platform/Platform.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/graphics/platform/Platform.ts b/src/graphics/platform/Platform.ts index 22d3fd5..13dacb0 100644 --- a/src/graphics/platform/Platform.ts +++ b/src/graphics/platform/Platform.ts @@ -139,7 +139,7 @@ class smallDoorGraphic extends Container { this.addChild(this.smallDoorGraphic); this.addChild(this.labelGraphic); } - draw(direction: string, stateData: IPlatformState, i): void { + draw(direction: string, stateData: IPlatformState, i: number): void { const start = -platformConsts.smallDoorWidth * 15 + platformConsts.smallDoorWidth * i; const smallDoorGraphic = this.smallDoorGraphic; @@ -175,9 +175,9 @@ export class doorGraphic extends Container { } } clear(): void { - this.children.forEach((smallDoorGraphic) => { - smallDoorGraphic.children[0].clear(); - smallDoorGraphic.children[1].text = ''; + this.children.forEach((g) => { + (g as smallDoorGraphic).smallDoorGraphic.clear(); + (g as smallDoorGraphic).labelGraphic.text = ''; }); } // changeState(stateData: IPlatformState): void {