技能系统 初步搭建,下步 伤害系统
This commit is contained in:
@@ -25,12 +25,16 @@ export class BattleMoveSystem extends ecs.ComblockSystem implements ecs.ISystemU
|
||||
const delta = view.speed * this.dt * move.direction;
|
||||
const newX = view.node.position.x + delta;
|
||||
|
||||
|
||||
view.status_change("move")
|
||||
// 限制移动范围
|
||||
if (this.validatePosition(newX, move)) {
|
||||
view.node.setPosition(newX, view.node.position.y, 0);
|
||||
}
|
||||
}
|
||||
else{
|
||||
view.status_change("idle")
|
||||
}
|
||||
|
||||
|
||||
// console.log(`[${view.hero_name}] 类型:${view.type} 是否停止:${shouldStop} 方向:${move.direction} 位置:${view.node.position.x.toFixed(1)}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user