This commit is contained in:
walkpan
2024-09-02 09:03:43 +08:00
parent 9028b86d4e
commit f367d1817a
27 changed files with 3953 additions and 3233 deletions

View File

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