hero 死亡进入墓地 而不是摧毁,todo 受伤动画重做
This commit is contained in:
@@ -53,44 +53,44 @@ export class HeroSpine extends Component {
|
||||
}
|
||||
onAnimationEvent(type: Animation.EventType, state: AnimationState){
|
||||
if(type==Animation.EventType.FINISHED){
|
||||
console.log("animator end",state.name);
|
||||
// console.log("animator end",state.name);
|
||||
if(state.name==this.atk_clip.name||state.name==this.max_clip.name){
|
||||
console.log("animator no atk and no max");
|
||||
// console.log("animator no atk and no max");
|
||||
this.default();
|
||||
}
|
||||
}
|
||||
}
|
||||
change_default(value:string){
|
||||
console.log("change default",value);
|
||||
// console.log("change default",value);
|
||||
this.default_clip=value;
|
||||
}
|
||||
default() {
|
||||
if(!this.in_playing()){
|
||||
console.log("do default");
|
||||
// console.log("do default");
|
||||
this.animator.play(this.default_clip);
|
||||
}
|
||||
|
||||
}
|
||||
idle(){
|
||||
if(!this.in_playing()){
|
||||
console.log("do idle");
|
||||
// console.log("do idle");
|
||||
this.animator.play(this.idle_clip.name);
|
||||
}
|
||||
}
|
||||
atk() {
|
||||
console.log("do atk");
|
||||
// console.log("do atk");
|
||||
this.animator.play(this.atk_clip.name);
|
||||
}
|
||||
|
||||
|
||||
max(){
|
||||
console.log("do max");
|
||||
// console.log("do max");
|
||||
this.animator.play(this.max_clip.name);
|
||||
}
|
||||
|
||||
move(){
|
||||
if(!this.in_playing()){
|
||||
console.log("do move");
|
||||
// console.log("do move");
|
||||
this.animator.play(this.move_clip.name);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user