列车激活端方向调整

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; arrowPoint = aP;
} }
this.pause.visible = true; this.pause.visible = true;
console.log(states.trainActiveDirection, this.train.code, states.driftTo);
if (states.trainActiveDirection !== 0) { if (states.trainActiveDirection !== 0) {
const lineIsLeft = let lineIsLeft;
this.train.arrowIsLeft && if (states.driftTo === (states.trainActiveDirection === 1)) {
states.driftTo === (states.trainActiveDirection === 1); lineIsLeft = this.train.arrowIsLeft;
} else {
lineIsLeft = !this.train.arrowIsLeft;
}
if (!lineIsLeft) { if (!lineIsLeft) {
const pP: Array<number> = []; const pP: Array<number> = [];
pausePoint.forEach((item, index) => { pausePoint.forEach((item, index) => {