feat(skill): 重构技能模块,新增技能前后摇动画和组件
- 新增技能前后摇动画资源及配置 - 添加技能组件(SkillCom, EndAnmCom)和视图组件 - 重构技能配置表,支持前后摇动画配置 - 删除旧版技能资源(prefab, boom目录) - 调整技能预制体路径结构
This commit is contained in:
34
assets/script/game/skill/EndAnm.ts
Normal file
34
assets/script/game/skill/EndAnm.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
|
||||
/** EndAnm 模块 */
|
||||
@ecs.register(`EndAnm`)
|
||||
export class EndAnm extends ecs.Entity {
|
||||
/** ---------- 数据层 ---------- */
|
||||
// EndAnmModel!: EndAnmModelComp;
|
||||
|
||||
/** ---------- 业务层 ---------- */
|
||||
// EndAnmBll!: EndAnmBllComp;
|
||||
|
||||
/** ---------- 视图层 ---------- */
|
||||
// EndAnmView!: EndAnmViewComp;
|
||||
|
||||
/** 实始添加的数据层组件 */
|
||||
protected init() {
|
||||
// this.addComponents<ecs.Comp>();
|
||||
}
|
||||
|
||||
/** 模块资源释放 */
|
||||
destroy() {
|
||||
// 注: 自定义释放逻辑,视图层实现 ecs.IComp 接口的 ecs 组件需要手动释放
|
||||
super.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
/** EndAnm 模块业务逻辑系统组件,如无业务逻辑处理可删除此对象 */
|
||||
export class EcsEndAnmSystem extends ecs.System {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
// this.add(new ecs.ComblockSystem());
|
||||
}
|
||||
}
|
||||
9
assets/script/game/skill/EndAnm.ts.meta
Normal file
9
assets/script/game/skill/EndAnm.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "1262d5a7-b1a1-49dc-9715-b7e28619304f",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
24
assets/script/game/skill/EndAnmCom.ts
Normal file
24
assets/script/game/skill/EndAnmCom.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
|
||||
/** 业务层对象 */
|
||||
@ecs.register('EndAnmCom')
|
||||
export class EndAnmComComp extends ecs.Comp {
|
||||
/** 业务层组件移除时,重置所有数据为默认值 */
|
||||
reset() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/** 业务层业务逻辑处理对象 */
|
||||
export class EndAnmComSystem extends ecs.ComblockSystem implements ecs.IEntityEnterSystem {
|
||||
filter(): ecs.IMatcher {
|
||||
return ecs.allOf(EndAnmComComp);
|
||||
}
|
||||
|
||||
entityEnter(e: ecs.Entity): void {
|
||||
// 注:自定义业务逻辑
|
||||
|
||||
|
||||
e.remove(EndAnmComComp);
|
||||
}
|
||||
}
|
||||
9
assets/script/game/skill/EndAnmCom.ts.meta
Normal file
9
assets/script/game/skill/EndAnmCom.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "e0728072-f94e-4741-b172-4157e7a3b335",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
29
assets/script/game/skill/EndView.ts
Normal file
29
assets/script/game/skill/EndView.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { _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";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@ccclass('EndViewComp')
|
||||
@ecs.register('EndView', false)
|
||||
export class EndViewComp extends CCComp {
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
start() {
|
||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
||||
// this.on(ModuleEvent.Cmd, this.onHandler, this);
|
||||
}
|
||||
|
||||
/** 全局消息逻辑处理 */
|
||||
// private onHandler(event: string, args: any) {
|
||||
// switch (event) {
|
||||
// case ModuleEvent.Cmd:
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
9
assets/script/game/skill/EndView.ts.meta
Normal file
9
assets/script/game/skill/EndView.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "b6a93d92-4e42-4f75-8c60-8d616afe33a1",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
34
assets/script/game/skill/Ready.ts
Normal file
34
assets/script/game/skill/Ready.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
|
||||
/** Read 模块 */
|
||||
@ecs.register(`Read`)
|
||||
export class Read extends ecs.Entity {
|
||||
/** ---------- 数据层 ---------- */
|
||||
// ReadModel!: ReadModelComp;
|
||||
|
||||
/** ---------- 业务层 ---------- */
|
||||
// ReadBll!: ReadBllComp;
|
||||
|
||||
/** ---------- 视图层 ---------- */
|
||||
// ReadView!: ReadViewComp;
|
||||
|
||||
/** 实始添加的数据层组件 */
|
||||
protected init() {
|
||||
// this.addComponents<ecs.Comp>();
|
||||
}
|
||||
|
||||
/** 模块资源释放 */
|
||||
destroy() {
|
||||
// 注: 自定义释放逻辑,视图层实现 ecs.IComp 接口的 ecs 组件需要手动释放
|
||||
super.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
/** Read 模块业务逻辑系统组件,如无业务逻辑处理可删除此对象 */
|
||||
export class EcsReadSystem extends ecs.System {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
// this.add(new ecs.ComblockSystem());
|
||||
}
|
||||
}
|
||||
9
assets/script/game/skill/Ready.ts.meta
Normal file
9
assets/script/game/skill/Ready.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "de61eb09-969a-4528-a822-edbb732dea01",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
29
assets/script/game/skill/ReadyView.ts
Normal file
29
assets/script/game/skill/ReadyView.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { _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";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@ccclass('ReadyViewComp')
|
||||
@ecs.register('ReadyView', false)
|
||||
export class ReadyViewComp extends CCComp {
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
start() {
|
||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
||||
// this.on(ModuleEvent.Cmd, this.onHandler, this);
|
||||
}
|
||||
|
||||
/** 全局消息逻辑处理 */
|
||||
// private onHandler(event: string, args: any) {
|
||||
// switch (event) {
|
||||
// case ModuleEvent.Cmd:
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
9
assets/script/game/skill/ReadyView.ts.meta
Normal file
9
assets/script/game/skill/ReadyView.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "6a8d3e5b-f363-4035-8bab-0b556b0d540e",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
34
assets/script/game/skill/Skill.ts
Normal file
34
assets/script/game/skill/Skill.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
|
||||
/** Skill 模块 */
|
||||
@ecs.register(`Skill`)
|
||||
export class Skill extends ecs.Entity {
|
||||
/** ---------- 数据层 ---------- */
|
||||
// SkillModel!: SkillModelComp;
|
||||
|
||||
/** ---------- 业务层 ---------- */
|
||||
// SkillBll!: SkillBllComp;
|
||||
|
||||
/** ---------- 视图层 ---------- */
|
||||
// SkillView!: SkillViewComp;
|
||||
|
||||
/** 实始添加的数据层组件 */
|
||||
protected init() {
|
||||
// this.addComponents<ecs.Comp>();
|
||||
}
|
||||
|
||||
/** 模块资源释放 */
|
||||
destroy() {
|
||||
// 注: 自定义释放逻辑,视图层实现 ecs.IComp 接口的 ecs 组件需要手动释放
|
||||
super.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
/** Skill 模块业务逻辑系统组件,如无业务逻辑处理可删除此对象 */
|
||||
export class EcsSkillSystem extends ecs.System {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
// this.add(new ecs.ComblockSystem());
|
||||
}
|
||||
}
|
||||
9
assets/script/game/skill/Skill.ts.meta
Normal file
9
assets/script/game/skill/Skill.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "95624913-36b6-472f-997b-552502dc437d",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
24
assets/script/game/skill/SkillCom.ts
Normal file
24
assets/script/game/skill/SkillCom.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
|
||||
/** 业务层对象 */
|
||||
@ecs.register('SkillCom')
|
||||
export class SkillComComp extends ecs.Comp {
|
||||
/** 业务层组件移除时,重置所有数据为默认值 */
|
||||
reset() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/** 业务层业务逻辑处理对象 */
|
||||
export class SkillComSystem extends ecs.ComblockSystem implements ecs.IEntityEnterSystem {
|
||||
filter(): ecs.IMatcher {
|
||||
return ecs.allOf(SkillComComp);
|
||||
}
|
||||
|
||||
entityEnter(e: ecs.Entity): void {
|
||||
// 注:自定义业务逻辑
|
||||
|
||||
|
||||
e.remove(SkillComComp);
|
||||
}
|
||||
}
|
||||
9
assets/script/game/skill/SkillCom.ts.meta
Normal file
9
assets/script/game/skill/SkillCom.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "4338992d-a768-4089-b1d2-dd8695712fc4",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
29
assets/script/game/skill/SkillView.ts
Normal file
29
assets/script/game/skill/SkillView.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { _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";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@ccclass('SkillViewComp')
|
||||
@ecs.register('SkillView', false)
|
||||
export class SkillViewComp extends CCComp {
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
start() {
|
||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
||||
// this.on(ModuleEvent.Cmd, this.onHandler, this);
|
||||
}
|
||||
|
||||
/** 全局消息逻辑处理 */
|
||||
// private onHandler(event: string, args: any) {
|
||||
// switch (event) {
|
||||
// case ModuleEvent.Cmd:
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
9
assets/script/game/skill/SkillView.ts.meta
Normal file
9
assets/script/game/skill/SkillView.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "57aabb3b-4c4d-49e6-86d3-01973373eeb8",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
Reference in New Issue
Block a user