no message
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
Direction, GameState, GridType, MoveState, MoverRole, addDirection,
|
||||
} from '../core/Define';
|
||||
import { GameManager } from '../manager/GameManager';
|
||||
import { markIsoDrawOrderDirty, resolveLevelDrawRoot } from '../level/TileLayout';
|
||||
import { scaledMoveSpeed, UNITY_VEHICLE_MOVE_SPEED } from '../core/GridConstants';
|
||||
import { cellToWorldCenter } from '../core/GridCoords';
|
||||
import {
|
||||
@@ -199,6 +200,7 @@ export class Movement extends Component {
|
||||
/** 主题 entityDisplay 变更后重算站立 Y(缩放刷新不会自动更新节点坐标) */
|
||||
reapplyCellStandPosition() {
|
||||
this.snapMoverToCellStand();
|
||||
this.markDrawOrderDirty();
|
||||
}
|
||||
|
||||
resetMoveRuntime() {
|
||||
@@ -216,15 +218,22 @@ export class Movement extends Component {
|
||||
Vec3.moveTowards(next, pos, this.targetPosition, this.moveSpeed * dt * speedMul);
|
||||
this.node.setPosition(next);
|
||||
this.onMoving();
|
||||
this.markDrawOrderDirty();
|
||||
this.syncRideAfterMoveStep();
|
||||
if (Vec3.distance(next, this.targetPosition) < 0.005) {
|
||||
this.node.setPosition(this.targetPosition);
|
||||
this.moveState = MoveState.Idle;
|
||||
this.moveWait = false;
|
||||
this.onMoveToTarget();
|
||||
this.markDrawOrderDirty();
|
||||
}
|
||||
}
|
||||
|
||||
private markDrawOrderDirty() {
|
||||
const root = resolveLevelDrawRoot(this.node);
|
||||
if (root) markIsoDrawOrderDirty(root);
|
||||
}
|
||||
|
||||
protected syncRideAfterMoveStep() {}
|
||||
|
||||
setDirection(dir: Direction) {
|
||||
|
||||
Reference in New Issue
Block a user