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