修复动画文件

This commit is contained in:
2024-09-11 14:18:49 +08:00
parent e8bf5e9763
commit 336c7cd947
38 changed files with 8701 additions and 5361 deletions

View File

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

View File

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