heros 卡片 细节完善 思考下步内容

This commit is contained in:
2024-11-19 10:52:20 +08:00
parent ce8b47de7d
commit e89f590979
6 changed files with 694 additions and 529 deletions

View File

@@ -170,11 +170,10 @@ export class HeroViewComp extends CCComp {
}
onPreSolve (selfCollider: Collider2D, otherCollider: Collider2D) {
let self_x = selfCollider.node.position.x;
let other_x = otherCollider.node.position.x;
if(selfCollider.group == otherCollider.group&&selfCollider.tag==otherCollider.tag){
if(otherCollider.node.name=="role") return
let self_x = selfCollider.node.position.x;
let other_x = otherCollider.node.position.x;
if(otherCollider.node.getComponent(HeroViewComp).type == this.type && self_x < other_x && Math.abs(other_x-self_x) < 30 ){
if(otherCollider.node.getComponent(HeroViewComp).type == this.type && self_x < other_x && Math.abs(other_x-self_x) < 15 ){
this.stop_cd = 0.1;
}
// if(selfCollider.node.position.y < otherCollider.node.position.y){
@@ -265,7 +264,7 @@ export class HeroViewComp extends CCComp {
if(dir < this.dis){
this.is_atking=true
this.stop_cd = 0.1
if(this.dis-dir > 45 ) this.stop_cd = 0.1
}else{
this.is_atking=false
}