去掉碰撞系统
This commit is contained in:
17
assets/script/game/common/ecs/position/BattleMoveComp.ts
Normal file
17
assets/script/game/common/ecs/position/BattleMoveComp.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { ecs } from "../../../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
@ecs.register('BattleMove')
|
||||
|
||||
export class BattleMoveComp extends ecs.Comp {
|
||||
/** 移动方向:1向右,-1向左 */
|
||||
direction: number = 1;
|
||||
/** 目标x坐标 */
|
||||
targetX: number = 0;
|
||||
/** 是否处于移动状态 */
|
||||
moving: boolean = true;
|
||||
|
||||
reset() {
|
||||
this.direction = 1;
|
||||
this.targetX = 0;
|
||||
this.moving = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user