monster add

This commit is contained in:
pan@work
2024-07-22 09:47:28 +08:00
parent 064b6bf1ae
commit e3b5f4bd05
31 changed files with 4417 additions and 17 deletions

View File

@@ -0,0 +1,33 @@
/*
* @Author: dgflash
* @Date: 2021-11-18 17:42:59
* @LastEditors: dgflash
* @LastEditTime: 2022-08-17 12:36:18
*/
import { Vec3, _decorator } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { MonsterSpine } from "./MonsterSpine";
const { ccclass, property } = _decorator;
/** 角色显示组件 */
@ccclass('MonsterViewComp') // 定义为 Cocos Creator 组件
@ecs.register('MonsterView', false) // 定义为 ECS 组件
export class MonsterViewComp extends CCComp {
/** 角色动画 */
as: MonsterSpine = null!;
/** 角色控制器 */
/** 视图层逻辑代码分离演示 */
onLoad() {
this.as = this.getComponent(MonsterSpine);
}
reset() {
this.node.destroy();
}
}