heros 卡片 细节完善 思考下步内容
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user