修复动画文件
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 = "idle";
|
||||
default_clip:string = "move";
|
||||
|
||||
onLoad() {
|
||||
// 角色控制组件
|
||||
@@ -34,7 +34,9 @@ export class HeroSpine extends Component {
|
||||
let animation = this.animator.getComponent(Animation);
|
||||
animation.on(Animation.EventType.FINISHED, this.onAnimationEvent, this)
|
||||
}
|
||||
|
||||
protected start(): void {
|
||||
this.move();
|
||||
}
|
||||
/** 初始化动画 */
|
||||
protected initAnimator() {
|
||||
this.animator=this.node.getChildByName("anm").getComponent(Animation);
|
||||
|
||||
@@ -91,7 +91,7 @@ export class HeroViewComp extends CCComp {
|
||||
// this.BoxRang = this.node.getChildByName("range_box");
|
||||
} /** 视图层逻辑代码分离演示 */
|
||||
start () {
|
||||
this.as.idle()
|
||||
this.as.move()
|
||||
this.sprite = this.node.getChildByName("anm").getComponent(Sprite);
|
||||
// this.node.getChildByName("top").setScale(this.scale,1);
|
||||
// this.node.getChildByName("atk").setScale(this.scale,1);
|
||||
|
||||
Reference in New Issue
Block a user