This commit is contained in:
fan 2023-07-27 09:28:55 +08:00
commit 81857d1087

View File

@ -139,7 +139,7 @@ class smallDoorGraphic extends Container {
this.addChild(this.smallDoorGraphic); this.addChild(this.smallDoorGraphic);
this.addChild(this.labelGraphic); this.addChild(this.labelGraphic);
} }
draw(direction: string, stateData: IPlatformState, i): void { draw(direction: string, stateData: IPlatformState, i: number): void {
const start = const start =
-platformConsts.smallDoorWidth * 15 + platformConsts.smallDoorWidth * i; -platformConsts.smallDoorWidth * 15 + platformConsts.smallDoorWidth * i;
const smallDoorGraphic = this.smallDoorGraphic; const smallDoorGraphic = this.smallDoorGraphic;
@ -175,9 +175,9 @@ export class doorGraphic extends Container {
} }
} }
clear(): void { clear(): void {
this.children.forEach((smallDoorGraphic) => { this.children.forEach((g) => {
smallDoorGraphic.children[0].clear(); (g as smallDoorGraphic).smallDoorGraphic.clear();
smallDoorGraphic.children[1].text = ''; (g as smallDoorGraphic).labelGraphic.text = '';
}); });
} }
// changeState(stateData: IPlatformState): void { // changeState(stateData: IPlatformState): void {