dd
This commit is contained in:
@@ -48,6 +48,8 @@ export class BoxRangComp extends CCComp {
|
||||
// console.log(this.node.name+"onEndContact: seft:"+selfCollider.group+"|other:"+otherCollider.group+"| tag: seft:"+selfCollider.tag+"|other:"+otherCollider.tag);
|
||||
this.MonViewComp.is_atking = false;
|
||||
this.MonViewComp.enemy = null;
|
||||
this.MonViewComp.as.change_default("move");
|
||||
this.MonViewComp.as.move();
|
||||
}
|
||||
}
|
||||
onPreSolve (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
|
||||
@@ -66,6 +68,8 @@ export class BoxRangComp extends CCComp {
|
||||
if(Math.abs(other_pos.x-self_pos.x) < this.MonViewComp.atk_dis){
|
||||
this.MonViewComp.is_atking = true;
|
||||
this.MonViewComp.stop_cd = 0.1
|
||||
this.MonViewComp.as.change_default("idle");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -50,10 +50,11 @@ export class MonSpine extends Component {
|
||||
}
|
||||
change_default(value:string){
|
||||
this.default_clip=value;
|
||||
this.animator.play(this.default_clip);
|
||||
}
|
||||
default() {
|
||||
this.animator.play(this.default_clip);
|
||||
if(!this.animator.getState(this.default_clip).isPlaying){
|
||||
this.animator.play(this.default_clip);
|
||||
}
|
||||
}
|
||||
idle(){
|
||||
if(!this.animator.getState(this.idle_clip.name).isPlaying){
|
||||
|
||||
Reference in New Issue
Block a user