需要修复 英雄目标错误
This commit is contained in:
@@ -18,7 +18,7 @@ const { ccclass, property } = _decorator;
|
||||
export class RoleSpine extends Component {
|
||||
private loop: boolean = true;
|
||||
private spine!: sp.Skeleton;
|
||||
private default:string = "move";
|
||||
private default:string = "idle";
|
||||
private atk_name: string = "atk";
|
||||
private move_name: string = "move";
|
||||
private max_name: string = "max";
|
||||
@@ -32,17 +32,16 @@ export class RoleSpine extends Component {
|
||||
this.spine = this.node.getChildByName("anm")!.getComponent(sp.Skeleton);
|
||||
this.spine.setEndListener(trackEntry => {
|
||||
var animationName = trackEntry.animation ? trackEntry.animation.name : "";
|
||||
console.log("[track %s][animation %s] end.", trackEntry.trackIndex, animationName);
|
||||
// if (animationName == "atk" || animationName== "max" ) {
|
||||
// this.spine.setAnimation(0, this.default, true);
|
||||
// }
|
||||
// console.log("[track %s][animation %s] end.", trackEntry.trackIndex, animationName);
|
||||
if (animationName == "atk" || animationName== "max" ) {
|
||||
this.spine.setAnimation(0, this.default, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
protected play(animName: string, loop: boolean) {
|
||||
|
||||
}
|
||||
atk(){
|
||||
|
||||
this.spine.setAnimation(0, this.atk_name, false);
|
||||
}
|
||||
idle(){
|
||||
|
||||
Reference in New Issue
Block a user