假期修改
This commit is contained in:
@@ -21,7 +21,7 @@ export class HeroSpine extends Component {
|
||||
atk_clip: AnimationClip = null!;
|
||||
max_clip: AnimationClip = null!;
|
||||
move_clip: AnimationClip = null!;
|
||||
default_clip:string = "move";
|
||||
default_clip:string = "";
|
||||
|
||||
onLoad() {
|
||||
// 角色控制组件
|
||||
@@ -31,6 +31,7 @@ export class HeroSpine extends Component {
|
||||
this.atk_clip = this.animator.clips[1];
|
||||
this.max_clip = this.animator.clips[2];
|
||||
this.move_clip = this.animator.clips[3];
|
||||
this.default_clip=this.move_clip.name;
|
||||
let animation = this.animator.getComponent(Animation);
|
||||
animation.on(Animation.EventType.FINISHED, this.onAnimationEvent, this)
|
||||
}
|
||||
@@ -40,6 +41,7 @@ export class HeroSpine extends Component {
|
||||
/** 初始化动画 */
|
||||
protected initAnimator() {
|
||||
this.animator=this.node.getChildByName("anm").getComponent(Animation);
|
||||
|
||||
// console.log("mon spine init",this.animator);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user