dd
This commit is contained in:
@@ -23,7 +23,22 @@ export default class MonsterSpineAnimator extends Component {
|
||||
// console.log("MonsterSpineAnimator start");
|
||||
this.playAnimation(this.animName, this.loop);
|
||||
}
|
||||
|
||||
mixTime:number= 0.2;
|
||||
|
||||
protected onLoad(): void {
|
||||
this.spine = this.getComponent(sp.Skeleton)!;
|
||||
// this.spine?.setMix('atk', 'move', this.mixTime);
|
||||
// this.spine?.setMix('move','atk', this.mixTime);
|
||||
this.spine.setEndListener(trackEntry => {
|
||||
var animationName = trackEntry.animation ? trackEntry.animation.name : "";
|
||||
// console.log("[track %s][animation %s] end.", trackEntry.trackIndex, animationName);
|
||||
if (animationName == "atk") {
|
||||
this.spine.setAnimation(0, "move", true);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
lateUpdate(dt: number) {
|
||||
//
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user