|
@@ -367,7 +367,7 @@ export class car extends Component {
|
|
|
}
|
|
|
check(){
|
|
|
}
|
|
|
- protected update(dt: number): void {
|
|
|
+ protected lateUpdate(dt: number): void {
|
|
|
if(!this.isStartGame){
|
|
|
return
|
|
|
}
|
|
@@ -459,10 +459,10 @@ export class car extends Component {
|
|
|
x = right
|
|
|
}
|
|
|
}
|
|
|
- this.node.setPosition(x,y)
|
|
|
this.offsetY =Math.abs(this.origin_pos_y-y)
|
|
|
let dir = new Vec3(this.map.position.x,-this.offsetY,this.map.position.z)
|
|
|
this.map.position = dir
|
|
|
+ this.node.setPosition(x,y)
|
|
|
}
|
|
|
}
|
|
|
|