去掉物理碰撞组件,英雄的移动改由系统逻辑统一处理

This commit is contained in:
2025-02-02 16:28:19 +08:00
parent e571ae2caf
commit 00148863ad
82 changed files with 397 additions and 5831 deletions

View File

@@ -48,22 +48,8 @@ export class SkillCom extends CCComp {
start() {
oops.message.on(GameEvent.MissionEnd, this.doDestroy, this);
this.node.active=true
let collider = this.getComponent(Collider2D);
collider.group = this.box_group;
collider.tag = this.box_tag;
collider.sensor = true;
if (collider) {
collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
// collider.on(Contact2DType.END_CONTACT, this.onEndContact, this);
// collider.on(Contact2DType.POST_SOLVE, this.onPostSolve, this);
}
}
onBeginContact (seCol: Collider2D, otCol: Collider2D, contact: IPhysics2DContact | null) {
if(otCol.group != seCol.group&&otCol.tag ==0){
this.atk_count+=1
}
}
to_console(value:any,value2:any=null,value3:any=null){
console.log("["+this.s_name+this.s_uuid+"]:",value,value2,value3)
}