列车车头调整
This commit is contained in:
parent
182ea7c099
commit
a4231d1813
@ -470,6 +470,7 @@ function handleSubscribe(lineScene: IGraphicScene) {
|
|||||||
states.push(new CarWashingState(item));
|
states.push(new CarWashingState(item));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
console.log(storage.allStatus.trainState, '====');
|
||||||
storage.allStatus.trainState.forEach((item) => {
|
storage.allStatus.trainState.forEach((item) => {
|
||||||
// 列车
|
// 列车
|
||||||
if (!item.show) {
|
if (!item.show) {
|
||||||
|
@ -335,7 +335,7 @@ export class TrainHead extends Container {
|
|||||||
];
|
];
|
||||||
// 道岔时运行x轴是否在增大决定箭头方向
|
// 道岔时运行x轴是否在增大决定箭头方向
|
||||||
// 区段时是否从A到B决定箭头方向
|
// 区段时是否从A到B决定箭头方向
|
||||||
if (states.devicePort && !this.train.arrowIsLeft) {
|
if (!this.train.arrowIsLeft) {
|
||||||
const aP: Array<number> = [];
|
const aP: Array<number> = [];
|
||||||
arrowPoint.forEach((item, index) => {
|
arrowPoint.forEach((item, index) => {
|
||||||
if (index % 2 == 1) {
|
if (index % 2 == 1) {
|
||||||
@ -346,6 +346,7 @@ export class TrainHead extends Container {
|
|||||||
});
|
});
|
||||||
arrowPoint = aP;
|
arrowPoint = aP;
|
||||||
}
|
}
|
||||||
|
this.pause.visible = true;
|
||||||
if (states.trainActiveDirection !== 0) {
|
if (states.trainActiveDirection !== 0) {
|
||||||
const lineIsLeft =
|
const lineIsLeft =
|
||||||
this.train.arrowIsLeft &&
|
this.train.arrowIsLeft &&
|
||||||
@ -369,7 +370,6 @@ export class TrainHead extends Container {
|
|||||||
this.pause.visible = false;
|
this.pause.visible = false;
|
||||||
}
|
}
|
||||||
const aColor = DiriveModelColorEnum.AM;
|
const aColor = DiriveModelColorEnum.AM;
|
||||||
|
|
||||||
const arrow = this.arrow;
|
const arrow = this.arrow;
|
||||||
arrow.beginFill(aColor, 1);
|
arrow.beginFill(aColor, 1);
|
||||||
arrow.drawPolygon(arrowPoint);
|
arrow.drawPolygon(arrowPoint);
|
||||||
|
Loading…
Reference in New Issue
Block a user