From aa7ad1edacc07dda19a8f83668a6e8f1b2a47e9e Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Sat, 11 May 2024 11:00:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=97=E8=BD=A6=E6=BF=80=E6=B4=BB=E7=AB=AF?= =?UTF-8?q?=E6=96=B9=E5=90=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/graphics/train/Train.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/graphics/train/Train.ts b/src/graphics/train/Train.ts index f64a29d..bb7e2c2 100644 --- a/src/graphics/train/Train.ts +++ b/src/graphics/train/Train.ts @@ -347,10 +347,14 @@ export class TrainHead extends Container { arrowPoint = aP; } this.pause.visible = true; + console.log(states.trainActiveDirection, this.train.code, states.driftTo); if (states.trainActiveDirection !== 0) { - const lineIsLeft = - this.train.arrowIsLeft && - states.driftTo === (states.trainActiveDirection === 1); + let lineIsLeft; + if (states.driftTo === (states.trainActiveDirection === 1)) { + lineIsLeft = this.train.arrowIsLeft; + } else { + lineIsLeft = !this.train.arrowIsLeft; + } if (!lineIsLeft) { const pP: Array = []; pausePoint.forEach((item, index) => {