This commit is contained in:
walkpan
2024-08-11 16:50:42 +08:00
parent 37bc93aa1c
commit 6355d80a2c
70 changed files with 1696 additions and 2535 deletions

View File

@@ -7,7 +7,6 @@
import { Color, Component, EventTouch, sp, Vec3, _decorator } from "cc";
import { LayerUtil } from "../../../../extensions/oops-plugin-framework/assets/core/utils/LayerUtil";
import { smc } from "../../../script/game/common/SingletonModuleComp";
// import Charactor, { CharactorDirection, CharactorState } from "../../map/view/map/charactor/Charactor";
import HeroSpineAnimator from "./HeroSpineAnimator";
const { ccclass, property } = _decorator;
@@ -21,15 +20,11 @@ export class HeroSpine extends Component {
animator: HeroSpineAnimator = null!;
private spine!: sp.Skeleton;
// private charactor!: Charactor;
onLoad() {
// 角色控制组件
// this.charactor = this.addComponent(Charactor)!;
this.initAnimator();
// this.setSkin("magic");
// this.animator.play("idle", true);
LayerUtil.setNodeLayer(LayerUtil.MAP, this.node);
}
@@ -38,21 +33,6 @@ export class HeroSpine extends Component {
this.spine = this.animator.getComponent(sp.Skeleton)!;
}
// setState(value: CharactorState): void {
// switch (value) {
// case CharactorState.Idle:
// this.idle();
// break;
// case CharactorState.Run:
// this.walk();
// break;
// }
// }
setSkin(value: string): void {
console.log("HeroSpine setSkin", value);
this.spine.setSkin(value);