dd
This commit is contained in:
@@ -15,7 +15,7 @@ const { ccclass, property, requireComponent, disallowMultiple } = _decorator;
|
||||
@disallowMultiple
|
||||
@requireComponent(sp.Skeleton)
|
||||
export default class RoleSpineAnimator extends Component {
|
||||
private animName: string = "Idle";
|
||||
private animName: string = "move";
|
||||
private loop: boolean = true;
|
||||
private spine!: sp.Skeleton;
|
||||
start() {
|
||||
@@ -32,8 +32,8 @@ export default class RoleSpineAnimator extends Component {
|
||||
this.spine.setEndListener(trackEntry => {
|
||||
var animationName = trackEntry.animation ? trackEntry.animation.name : "";
|
||||
// console.log("[track %s][animation %s] end.", trackEntry.trackIndex, animationName);
|
||||
if (animationName == "Throwing"||animationName == "Hit") {
|
||||
this.spine.setAnimation(0, "Idle", true);
|
||||
if (animationName == "atk2" ||animationName == "magic"||animationName=="max") {
|
||||
this.spine.setAnimation(0, "move", true);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user