列车激活端方向调整

This commit is contained in:
joylink_fanyuhong 2024-05-11 11:00:54 +08:00
parent a4231d1813
commit aa7ad1edac

View File

@ -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<number> = [];
pausePoint.forEach((item, index) => {