role 也转为使用hero 预制体
This commit is contained in:
@@ -108,7 +108,7 @@ export class SkillCom extends CCComp {
|
||||
|
||||
}
|
||||
onBeginContact (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
|
||||
if(otherCollider.group != selfCollider.group&&otherCollider.tag !=BoxSet.ATK_RANGE&&otherCollider.tag !=BoxSet.SKILL_TAG){
|
||||
if(otherCollider.group != selfCollider.group&&otherCollider.tag ==0){
|
||||
this.atk_count+=1
|
||||
// console.log("skill onBeginContact",selfCollider.group,otherCollider.group)
|
||||
if(this.type==1 ){
|
||||
@@ -148,7 +148,7 @@ export class SkillCom extends CCComp {
|
||||
// this.move(deltaTime)
|
||||
this.toDestroy()
|
||||
// this.t_move(deltaTime)
|
||||
if (this.node.position.x > 400||this.node.position.x < -400||this.node.position.y > 1000||this.node.position.y < BoxSet.GAME_LINE) {
|
||||
if (this.node.position.x > 400||this.node.position.x < -400||this.node.position.y > 1000||this.node.position.y < -100) {
|
||||
this.is_destroy=true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user