feat(技能系统): 添加技能盒组件和预制体
- 新增 SkillBoxComp 和 MissSkillsComp 组件,用于技能盒视图逻辑 - 创建 sbox.prefab 技能盒预制体,包含完整的 UI 结构和精灵组件 - 为组件添加元数据文件,支持 ECS 框架集成
This commit is contained in:
34
assets/script/game/map/MissSkillsComp.ts
Normal file
34
assets/script/game/map/MissSkillsComp.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { mLogger } from "../common/Logger";
|
||||
import { _decorator, Node, Prefab } 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 { CardType } from "../common/config/CardSet";
|
||||
import { oops } from "db://oops-framework/core/Oops";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
|
||||
|
||||
/** 视图层对象 */
|
||||
@ccclass('MissSkillsComp')
|
||||
@ecs.register('MissSkillsComp', false)
|
||||
export class MissSkillsComp extends CCComp {
|
||||
private debugMode: boolean = true;
|
||||
@property({type: Prefab})
|
||||
private skill_box: Prefab = null;
|
||||
|
||||
onLoad() {
|
||||
|
||||
}
|
||||
|
||||
start() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
9
assets/script/game/map/MissSkillsComp.ts.meta
Normal file
9
assets/script/game/map/MissSkillsComp.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "68387c27-1f8e-4056-8e8d-728fa95ed1b9",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
34
assets/script/game/map/SkillBoxComp.ts
Normal file
34
assets/script/game/map/SkillBoxComp.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { mLogger } from "../common/Logger";
|
||||
import { _decorator, Node, Prefab } 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 { CardType } from "../common/config/CardSet";
|
||||
import { oops } from "db://oops-framework/core/Oops";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
|
||||
|
||||
/** 视图层对象 */
|
||||
@ccclass('SkillBoxComp')
|
||||
@ecs.register('SkillBoxComp', false)
|
||||
export class SkillBoxComp extends CCComp {
|
||||
private debugMode: boolean = true;
|
||||
@property({type: Node})
|
||||
private icon_node:Node= null;
|
||||
|
||||
onLoad() {
|
||||
|
||||
}
|
||||
|
||||
start() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
9
assets/script/game/map/SkillBoxComp.ts.meta
Normal file
9
assets/script/game/map/SkillBoxComp.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "ca51918b-eae4-486b-82e8-ce89544a6a0d",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
Reference in New Issue
Block a user