技能开始

This commit is contained in:
2025-01-03 16:43:03 +08:00
parent df8738bd84
commit 0524eee5e0
21 changed files with 1347 additions and 233 deletions

View File

@@ -185,13 +185,13 @@ export class HeroViewComp extends CCComp {
if(selfCollider.group == otherCollider.group&&selfCollider.tag==otherCollider.tag){
if(selfCollider.group==BoxSet.HERO){
if(otherCollider.node.getComponent(HeroViewComp).type == this.type && self_x < other_x && Math.abs(other_x-self_x) < 50 ){
if(otherCollider.node.getComponent(HeroViewComp).type == this.type && self_x < other_x && Math.abs(other_x-self_x) < 40 ){
// this.node.setSiblingIndex(otherCollider.node.getSiblingIndex()-10)
this.stop_cd = 0.1;
}
}
if(selfCollider.group==BoxSet.MONSTER){
if(otherCollider.node.getComponent(HeroViewComp).type == this.type && self_x > other_x && Math.abs(other_x-self_x) < 50 ){
if(otherCollider.node.getComponent(HeroViewComp).type == this.type && self_x > other_x && Math.abs(other_x-self_x) < 40 ){
// this.node.setSiblingIndex(otherCollider.node.getSiblingIndex()-10)
this.stop_cd = 0.1;
}