hero 死亡进入墓地 而不是摧毁,todo 受伤动画重做

This commit is contained in:
2024-11-15 10:17:06 +08:00
parent 425a8bac64
commit e907141580
6 changed files with 75 additions and 88 deletions

View File

@@ -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);
}
}