动画重做,需要修改
This commit is contained in:
@@ -5,8 +5,6 @@
|
||||
* @LastEditTime: 2022-08-04 15:26:26
|
||||
*/
|
||||
import { Color, Component, EventTouch, sp, Vec3, _decorator ,Animation, AnimationClip, AnimationState,} from "cc";
|
||||
import { LayerUtil } from "../../../../extensions/oops-plugin-framework/assets/core/utils/LayerUtil";
|
||||
import { smc } from "../../../script/game/common/SingletonModuleComp";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -17,15 +15,11 @@ const { ccclass, property } = _decorator;
|
||||
export class HeroSpine extends Component {
|
||||
@property(Animation)
|
||||
animator: Animation = null!;
|
||||
idle_clip: AnimationClip = null!;
|
||||
atk_clip: AnimationClip = null!;
|
||||
move_clip: AnimationClip = null!;
|
||||
default_clip:string = "";
|
||||
|
||||
|
||||
onLoad() {
|
||||
// 角色控制组件
|
||||
this.initAnimator();
|
||||
LayerUtil.setNodeLayer(LayerUtil.MAP, this.node);
|
||||
this.idle_clip = this.animator.clips[0];
|
||||
this.atk_clip = this.animator.clips[1];
|
||||
this.move_clip = this.animator.clips[2];
|
||||
|
||||
Reference in New Issue
Block a user