删除老版框架模板

This commit is contained in:
dgflash
2024-10-19 16:06:45 +08:00
parent 43f61017ea
commit 0f711a9245
12 changed files with 5 additions and 172 deletions

View File

@@ -1,2 +0,0 @@
[InternetShortcut]
URL=https://docs.cocos.com/creator/manual/en/scripting/setup.html#custom-script-template

View File

@@ -1,25 +0,0 @@
import { ecs } from "db://oops-framework/libs/ecs/ECS";
/** <%Name%> 模块 */
@ecs.register(`<%Name%>`)
export class <%Name%> extends ecs.Entity {
/** ---------- 数据层 ---------- */
// <%Name%>Model!: <%Name%>ModelComp;
/** ---------- 业务层 ---------- */
// <%Name%>Bll!: <%Name%>BllComp;
/** ---------- 视图层 ---------- */
// <%Name%>View!: <%Name%>ViewComp;
/** 初始添加的数据层组件 */
protected init() {
// this.addComponents<ecs.Comp>();
}
/** 模块资源释放 */
destroy() {
// 注: 自定义释放逻辑,视图层实现 ecs.IComp 接口的 ecs 组件需要手动释放
super.destroy();
}
}

View File

@@ -1,25 +0,0 @@
import { ecs } from "db://oops-framework/libs/ecs/ECS";
/** 业务层对象 */
@ecs.register('<%Name%>')
export class <%Name%>Comp extends ecs.Comp {
/** 业务层组件移除时,重置所有数据为默认值 */
reset() {
}
}
/** 业务层业务逻辑处理对象 */
@ecs.register('实体对象名')
export class <%Name%>System extends ecs.ComblockSystem implements ecs.IEntityEnterSystem {
filter(): ecs.IMatcher {
return ecs.allOf(<%Name%>Comp);
}
entityEnter(e: ecs.Entity): void {
// 注:自定义业务逻辑
e.remove(<%Name%>Comp);
}
}

View File

@@ -1,26 +0,0 @@
import { ecs } from "db://oops-framework/libs/ecs/ECS";
import { VM } from "db://oops-framework/libs/model-view/ViewModel";
/** 数据层对象 */
@ecs.register('<%Name%>')
export class <%Name%>Comp extends ecs.Comp {
/** 提供 MVVM 组件使用的数据 */
private vm: any = {};
/** 显示数据添加到 MVVM 框架中监视 */
vmAdd() {
VM.add(this.vm, "<%Name%>");
}
/** 显示数据从 MVVM 框架中移除 */
vmRemove() {
VM.remove("<%Name%>");
}
/** 数据层组件移除时,重置所有数据为默认值 */
reset() {
for (let key in this.vm) {
delete this.vm[key];
}
}
}

View File

@@ -1,23 +0,0 @@
import { JsonUtil } from "db://oops-framework/core/utils/JsonUtil";
/** 策划 Excel 导出的 Json 静态数据 */
export class <%Name%> {
static TableName: string = "配置表文件名";
/** 静态表中一条数据 */
private data: any;
init(id: number) {
const table = JsonUtil.get(<%Name%>.TableName);
this.data = table[id];
this.id = id;
}
/** 数据唯一编号 */
id: number = 0;
/** 数据 */
// get test(): number {
// return this.data.test;
// }
}

View File

@@ -1,20 +0,0 @@
import { _decorator } from "cc";
import { ecs } from "db://oops-framework/libs/ecs/ECS";
import { CCComp } from "db://oops-framework/module/common/CCComp";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@ccclass('<%Name%>Comp')
@ecs.register('<%Name%>', false)
export class <%Name%>Comp extends CCComp {
/** 视图层逻辑代码分离演示 */
start() {
// const entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {
this.node.destroy();
}
}

View File

@@ -1,23 +0,0 @@
import { _decorator } from "cc";
import { ecs } from "db://oops-framework/libs/ecs/ECS";
import { CCVMParentComp } from "db://oops-framework/module/common/CCVMParentComp";
const { ccclass, property } = _decorator;
/** 视图层对象 - 支持 MVVM 框架的数据绑定 */
@ccclass('<%Name%>Comp')
@ecs.register('<%Name%>', false)
export class <%Name%>Comp extends CCVMParentComp {
/** 脚本控制的界面 MVVM 框架绑定数据 */
data: any = {};
/** 视图层逻辑代码分离演示 */
start() {
// const entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {
this.node.destroy();
}
}

View File

@@ -1 +0,0 @@
{"image":{"type":"sprite-frame"}}

View File

@@ -1,15 +0,0 @@
md extensions
cd extensions
IF EXIST oops-plugin-framework-tools (
goto update
) ELSE (
goto clone
)
:clone
git clone -b master https://gitee.com/dgflash/oops-plugin-framework-tools.git
:update
cd oops-plugin-framework-tools
git pull

View File

@@ -1,11 +0,0 @@
if [ ! -d "extensions" ]; then
mkdir extensions
fi
cd extensions
if [ ! -d "oops-plugin-framework-tools" ]; then
git clone -b master https://gitee.com/dgflash/oops-plugin-framework-tools.git
else
cd oops-plugin-framework-tools
git pull
fi

View File

@@ -12,4 +12,6 @@ git clone -b master https://gitee.com/dgflash/oops-plugin-framework.git
:update
cd oops-plugin-framework
git pull
git pull
npm install

View File

@@ -9,3 +9,5 @@ else
cd oops-plugin-framework
git pull
fi
npm install