技能系统 初步搭建,下步 伤害系统

This commit is contained in:
2025-02-03 01:07:56 +08:00
parent 2e53786aa0
commit 5536428125
15 changed files with 465 additions and 846 deletions

View File

@@ -9,17 +9,12 @@ export class EndAnmBomCom extends Component {
time:number = 0
base:SkillCom = null
collider:Collider2D = null
rigid:RigidBody2D= null
is_complete:boolean = false
start() {
this.base =this.node.getComponent(SkillCom)
this.collider = this.getComponent(Collider2D);
this.rigid = this.getComponent(RigidBody2D);
console.log("collider",this.collider,this.rigid)
this.rigid.sleep()
this.scheduleOnce(()=>{
this.rigid.wakeUp()
},0.5)
// this.collider.enabled = false
// if(this.base.box_group ==BoxSet.HERO) this.collider.group = BoxSet.MONSTER
@@ -56,7 +51,7 @@ export class EndAnmBomCom extends Component {
// // this.collider.enabled = true
// console.log("动画结束,开始伤害")
// }
this.rigid.wakeUp()
// this.collider.enabled = true
console.log("动画结束,开始伤害")
this.base.is_destroy = true
@@ -67,7 +62,7 @@ export class EndAnmBomCom extends Component {
// this.collider.group = this.base.box_group
// this.node.active=false
// this.node.active=true
this.rigid.wakeUp()
// this.collider.enabled = true
console.log("onEnvent,开始伤害",event)
this.is_complete=true