去除 英雄升级相关

This commit is contained in:
2025-03-18 10:21:57 +08:00
parent b0d35b6ff5
commit 82d80a7537
20 changed files with 1374 additions and 3667 deletions

View File

@@ -53,13 +53,10 @@
},
{
"__id__": 136
},
{
"__id__": 138
}
],
"_prefab": {
"__id__": 140
"__id__": 138
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -3192,24 +3189,6 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "32bpMN2RNIXbFGf0XrTQcR"
},
{
"__type__": "b2cd8XVSgFEMKzb3TfqpF3V",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 139
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "6bqJpMREJEv5yTpaFarPim"
},
{
"__type__": "cc.PrefabInfo",
"root": {

View File

@@ -32,16 +32,10 @@
},
{
"__id__": 40
},
{
"__id__": 42
},
{
"__id__": 44
}
],
"_prefab": {
"__id__": 47
"__id__": 42
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -936,94 +930,6 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "32bpMN2RNIXbFGf0XrTQcR"
},
{
"__type__": "e50ae68DJJPcqtoSXnmOcGT",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 43
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "7cMkGEWuhL85u6N6BcnP89"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 45
},
"clickEvents": [
{
"__id__": 46
}
],
"_interactable": true,
"_transition": 3,
"_normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_hoverColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_pressedColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_normalSprite": null,
"_hoverSprite": null,
"_pressedSprite": null,
"_disabledSprite": null,
"_duration": 0.1,
"_zoomScale": 1.2,
"_target": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "4eYZzd0tZCnaXQJvFU/nxf"
},
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 1
},
"component": "",
"_componentId": "e50ae68DJJPcqtoSXnmOcGT",
"handler": "show_info",
"customEventData": ""
},
{
"__type__": "cc.PrefabInfo",
"root": {

View File

@@ -53,13 +53,10 @@
},
{
"__id__": 120
},
{
"__id__": 123
}
],
"_prefab": {
"__id__": 125
"__id__": 123
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -2855,24 +2852,6 @@
"handler": "select",
"customEventData": ""
},
{
"__type__": "e5696NXnjxEoLkxESF1rUMV",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 124
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "b3T3dSL61JmpylrCsj3OgD"
},
{
"__type__": "cc.PrefabInfo",
"root": {

View File

@@ -35,13 +35,10 @@
},
{
"__id__": 1419
},
{
"__id__": 1421
}
],
"_prefab": {
"__id__": 1423
"__id__": 1421
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -1307,7 +1304,7 @@
"__id__": 1393
}
],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 1412
@@ -4948,7 +4945,7 @@
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
@@ -33513,24 +33510,6 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "4ameURxcpI/qNThRrj/m3R"
},
{
"__type__": "f8304VeHLhDebOCbedMODFm",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 1422
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f7/EZY8/pM04gz3JrN9oit"
},
{
"__type__": "cc.PrefabInfo",
"root": {

File diff suppressed because it is too large Load Diff

View File

@@ -1,43 +0,0 @@
import { instantiate, Label, Prefab, resources, Sprite, SpriteAtlas } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { HeroCardComp } from "./HeroCardComp";
import { smc } from "../common/SingletonModuleComp";
import { HeroInfo } from "../common/config/heroSet";
/** HeroCard 模块 */
@ecs.register(`HeroCard`)
export class HeroCard extends ecs.Entity {
protected init() {
// this.addComponents<ecs.Comp>();
}
load(uuid:number=101,parent:any) {
// var path = "game/monster/"+prefab_path;
var path = "game/gui/hero_card";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
// let slv = node.getChildByName("slv");
node.parent = parent;
var icon_path = "game/heros/herois"
node.getChildByName("name").getComponent(Label).string = HeroInfo[uuid].name
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
const sprite = node.getChildByName("Mask").getChildByName("hero").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[uuid].path);
});
// var path = "game/heros/uiheros/"+HeroInfo[uuid].path;
// var prefab: Prefab = oops.res.get(path, Prefab)!;
// var snode = instantiate(prefab);
// snode.parent = node.getChildByName("Mask")
let hcc = node.getComponent(HeroCardComp)!;
hcc.h_uuid = uuid;
hcc.update_data();
this.add(hcc);
}
/** 模块资源释放 */
destroy() {
// 注: 自定义释放逻辑,视图层实现 ecs.IComp 接口的 ecs 组件需要手动释放
super.destroy();
}
}

View File

@@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "d7e27567-5e31-483e-bd8e-c4efd272660c",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -1,78 +0,0 @@
import { _decorator, Color, instantiate, Label, Prefab, ProgressBar, Sprite } 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 { HeroHomeComp } from "../map/HeroHomeComp";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { smc } from "../common/SingletonModuleComp";
import { HeroInfo } from "../common/config/heroSet";
import { ColorSet } from "../common/config/BoxSet";
import { getUpChipByLv, SlvUp } from "../common/config/RoleSet";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@ccclass('HeroCardComp')
@ecs.register('HeroCardComp', false)
export class HeroCardComp extends CCComp {
hcc_home: HeroHomeComp = null!;
h_uuid: number = 0;
onLoad() {
oops.message.on("hero_card_show_info", this.check_show, this);
oops.message.on("hero_card_update_info", this.update_data, this);
}
/** 视图层逻辑代码分离演示 */
start() {
this.hcc_home=this.node.parent.parent.parent.parent.getComponent(HeroHomeComp);
// console.log("hero_card hcc_home",this.hcc_home)
}
show_info(){
this.hcc_home.hero_show(this.h_uuid)
oops.message.dispatchEvent("hero_card_show_info",{uuid:this.h_uuid})
}
check_show(event: string, args: any){
// console.log("hero_card check_show",args)
this.show_bg(false)
if(args.uuid==this.h_uuid){
this.show_bg(true)
}
}
show_bg(val:boolean){
// this.node.getChildByName("show").active=val
}
update_data(){
let slv = this.node.getChildByName("slv")
this.node.getChildByName("lv").getComponent(Label).string=smc.heros[this.h_uuid].lv.toString()+"级"
// if(smc.heros[this.h_uuid].slv==0){
// this.node.getChildByName("lock").active=true
// slv.active=false
// }else{
// slv.active=true
// this.node.getChildByName("lock").active=false
// slv.getChildByName("slv").getComponent(Label).string=smc.heros[this.h_uuid].slv.toString()
// }
let lvneed=(getUpChipByLv(smc.heros[this.h_uuid].lv)-HeroInfo[this.h_uuid].lvexp)*smc.heros[this.h_uuid].lv
let lvnum=smc.heros[this.h_uuid].num
this.node.getChildByName("up").active=lvnum>=lvneed
this.node.getChildByName("need").getComponent(Label).string = lvneed.toString()
this.node.getChildByName("num").getComponent(Label).string = lvnum.toString()
this.node.getChildByName("bar").getComponent(ProgressBar).progress = lvnum/lvneed
this.node.getChildByName("g1").active=HeroInfo[this.h_uuid].quality==1
this.node.getChildByName("g2").active=HeroInfo[this.h_uuid].quality==2
this.node.getChildByName("g3").active=HeroInfo[this.h_uuid].quality==3
}
call_hero(uuid:number){
var path = "game/heros/uiheros/"+HeroInfo[uuid].path;
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
node.parent = this.node.getChildByName("Mask")
}
clear_hero(){
this.node.getChildByName("Mask").destroyAllChildren()
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {
this.node.destroy();
}
}

View File

@@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "e50aeebc-0c92-4f72-ab68-4979e639c193",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -1,44 +0,0 @@
import { instantiate, Label, Prefab, resources, Sprite, SpriteAtlas } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { HeroSelectComp } from "./HeroSelectComp";
import { smc } from "../common/SingletonModuleComp";
import { HeroInfo } from "../common/config/heroSet";
/** HeroSelect 模块 */
@ecs.register(`HeroSelect`)
export class HeroSelect extends ecs.Entity {
protected init() {
// this.addComponents<ecs.Comp>();
}
load(uuid:number=101,parent:any) {
// var path = "game/monster/"+prefab_path;
var path = "game/gui/hero_set";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
// let slv = node.getChildByName("slv");
node.parent = parent;
var icon_path = "game/heros/herois"
node.getChildByName("name").getComponent(Label).string = HeroInfo[uuid].name
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
const sprite = node.getChildByName("Mask").getChildByName("hero").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[uuid].path);
});
// var path = "game/heros/uiheros/"+HeroInfo[uuid].path;
// var prefab: Prefab = oops.res.get(path, Prefab)!;
// var snode = instantiate(prefab);
// snode.parent = node.getChildByName("Mask")
let hcc = node.getComponent(HeroSelectComp)!;
hcc.h_uuid = uuid;
hcc.update_data();
this.add(hcc);
}
/** 模块资源释放 */
destroy() {
// 注: 自定义释放逻辑,视图层实现 ecs.IComp 接口的 ecs 组件需要手动释放
super.destroy();
}
}

View File

@@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "675a0ae2-9928-4084-80ac-1b35115e3959",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -1,78 +0,0 @@
import { _decorator, Color, Label, Sprite } 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 { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { smc } from "../common/SingletonModuleComp";
import { ColorSet, GameSet } from "../common/config/BoxSet";
import { HeroInfo } from "../common/config/heroSet";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@ccclass('HeroSelectComp')
@ecs.register('HeroSelectComp', false)
export class HeroSelectComp extends CCComp {
h_uuid: number = 0;
onLoad() {
oops.message.on("hero_set_select", this.check_show, this);
oops.message.on("hero_card_update_info", this.update_data, this);
}
/** 视图层逻辑代码分离演示 */
start() {
if(smc.fight_heros.indexOf(this.h_uuid)>=0){
this.show_bg(true)
}else{
this.show_bg(false)
}
}
select(){
if(smc.fight_heros.indexOf(this.h_uuid)>=0){
smc.fight_heros.splice(smc.fight_heros.indexOf(this.h_uuid),1)
this.show_bg(false)
oops.message.dispatchEvent("hero_card_cancel_select",{uuid:this.h_uuid})
return
}
if(smc.fight_heros.length>= GameSet.HERO_NUM){
oops.gui.toast(`英雄数量不能超过 ${GameSet.HERO_NUM}`);
return
}
smc.fight_heros.push(this.h_uuid)
oops.message.dispatchEvent("hero_card_select",{uuid:this.h_uuid})
this.show_bg(true)
}
check_show(event: string, args: any){
// console.log("hero_set check_show",args)
this.show_bg(false)
if(args.uuid==this.h_uuid){
this.show_bg(true)
}
}
show_bg(val:boolean){
this.node.getChildByName("show").active=val
}
update_data(){
// let slv = this.node.getChildByName("slv")
this.node.getChildByName("lv").getComponent(Label).string=smc.heros[this.h_uuid].lv.toString()+"级"
// if(smc.heros[this.h_uuid].slv==0){
// slv.active=false
// }else{
// slv.active=true
// slv.getChildByName("slv").getComponent(Label).string=smc.heros[this.h_uuid].slv.toString()
// }
this.node.getChildByName("g1").active=HeroInfo[this.h_uuid].quality==1
this.node.getChildByName("g2").active=HeroInfo[this.h_uuid].quality==2
this.node.getChildByName("g3").active=HeroInfo[this.h_uuid].quality==3
}
/** 全局消息逻辑处理 */
// private onHandler(event: string, args: any) {
// switch (event) {
// case ModuleEvent.Cmd:
// break;
// }
// }
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {
this.node.destroy();
}
}

View File

@@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "e5696357-9e3c-44a0-b931-112175ad4315",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -1,40 +0,0 @@
import { instantiate, Prefab, resources, Sprite, SpriteAtlas } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { smc } from "../common/SingletonModuleComp";
import { HCardComp } from "./HCardComp";
import { HeroInfo } from "../common/config/heroSet";
/** HCard 模块 */
@ecs.register(`HCard`)
export class HCard extends ecs.Entity {
/** 实始添加的数据层组件 */
protected init() {
// this.addComponents<ecs.Comp>();
}
load(uuid:number=1001,index:number=-1,parent:any) {
var path = "game/gui/hcard";
var icon_path = "game/heros/herois"
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
const sprite = node.getChildByName("Mask").getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[uuid].path);
});
var prefab: Prefab = oops.res.get(path, Prefab)!;
console.log("load_hcard",prefab)
var node = instantiate(prefab);
node.parent = parent
// var path = "game/heros/uiheros/"+HeroInfo[uuid].path;
// var prefab: Prefab = oops.res.get(path, Prefab)!;
// var snode = instantiate(prefab);
// snode.parent = node.getChildByName("Mask")
var hcc = node.getComponent(HCardComp)!;
hcc.hi= index
this.add(hcc)
}
/** 模块资源释放 */
destroy() {
// 注: 自定义释放逻辑,视图层实现 ecs.IComp 接口的 ecs 组件需要手动释放
super.destroy();
}
}

View File

@@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "92107feb-d660-4d0b-9ed8-a27bf6bcdd46",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -1,68 +0,0 @@
import { _decorator,Button,Color,EventHandler,EventTouch,Label,NodeEventType,ProgressBar,resources,Sprite,SpriteAtlas,UITransform,v3 } 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 { smc } from "../common/SingletonModuleComp";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { RandomManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/random/RandomManager";
import { HeroModelComp } from "../hero/HeroModelComp";
import { HeroInfo } from "../common/config/heroSet";
import { ColorSet } from "../common/config/BoxSet";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@ccclass('HCardComp')
@ecs.register('HCardComp', false)
export class HCardComp extends CCComp {
hi: number = 0;
heros:any = []
icon:any=[]
hc_name:any=[]
ap:any=[]
hp:any=[]
life:any=[]
pw:any=[]
is_dead:boolean=false
protected onLoad(): void {
}
start() {
this.heros= ecs.query(ecs.allOf(HeroModelComp));
this.hc_name=this.node.getChildByName("name").getComponent(Label)!
// this.icon=this.node.getChildByName("icon").getComponent(Sprite)!
// this.hp=this.node.getChildByName("hp").getChildByName("num").getComponent(Label)!
// this.ap=this.node.getChildByName("ap").getChildByName("num").getComponent(Label)!
this.life=this.node.getChildByName("life").getComponent(ProgressBar)!
this.pw=this.node.getChildByName("pow").getComponent(ProgressBar)!
this.hc_name.string= this.heros[this.hi].HeroView.hero_name
// this.node.getChildByName("lv").getComponent(Label).string=this.heros[this.hi].HeroView.lv.toString()+"级";
// // console.log("hcard start",this.heros[this.hi].HeroView.hero_uuid)
// this.node.getChildByName("g1").active=HeroInfo[this.heros[this.hi].HeroView.hero_uuid].quality==1
// this.node.getChildByName("g2").active=HeroInfo[this.heros[this.hi].HeroView.hero_uuid].quality==2
// this.node.getChildByName("g3").active=HeroInfo[this.heros[this.hi].HeroView.hero_uuid].quality==3
}
protected update(dt: number): void {
if(this.is_dead) return
if(this.heros[this.hi].HeroView.is_dead){
this.node.getChildByName("dead").active=true
this.node.getChildByName("bg").getComponent(Sprite).grayscale=true
this.is_dead=true
}else{
this.node.getChildByName("dead").active=false
this.node.getChildByName("bg").getComponent(Sprite).grayscale=false
this.is_dead=false
}
// this.hp.string=(this.heros[this.hi].HeroView.hp_max).toFixed(0)
// this.ap.string=(this.heros[this.hi].HeroView.ap*(smc.vmdata.mission.ap+100)/100).toFixed(0)
this.life.progress=this.heros[this.hi].HeroView.hp/this.heros[this.hi].HeroView.hp_max
this.pw.progress=this.heros[this.hi].HeroView.pw/this.heros[this.hi].HeroView.pwm
}
/** 视图对象通过 ecs.Entity.remove(ControllerComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {
console.log("hcard reset");
this.node.destroy();
}
}

View File

@@ -1 +0,0 @@
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"b2cd85d5-4a01-4430-acdb-dd37eaa45dd5","files":[],"subMetas":{},"userData":{}}

View File

@@ -2,7 +2,6 @@ import { _decorator,Button,color,EventHandler,EventTouch,instantiate,Label,NodeE
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { HeroInfo, HeroList } from "../common/config/heroSet";
import { HeroCard } from "../hero/HeroCard";
import { smc } from "../common/SingletonModuleComp";
import { UIID } from "../common/config/GameUIConfig";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
@@ -38,26 +37,8 @@ export class HeroHomeComp extends CCComp {
parent.getComponent(UITransform).setContentSize(hc*185,230)
// console.log("hc",hc,parent.getComponent(UITransform))
console.log("parent",parent)
for (let i = 0; i < hc; i++) {
let hcc =ecs.getEntity<HeroCard>(HeroCard)
hcc.load(HeroList[i],parent)
// if (HeroInfo[HeroList[i]].quality==3) {
// let hcc =ecs.getEntity<HeroCard>(HeroCard)
// hcc.load(HeroList[i],parent)
// }
}
// for (let i = 0; i < hc; i++) {
// if (HeroInfo[HeroList[i]].quality==2) {
// let hcc =ecs.getEntity<HeroCard>(HeroCard)
// hcc.load(HeroList[i],parent)
// }
// }
// for (let i = 0; i < hc; i++) {
// if (HeroInfo[HeroList[i]].quality==1) {
// let hcc =ecs.getEntity<HeroCard>(HeroCard)
// hcc.load(HeroList[i],parent)
// }
// }
}
hero_show(uuid:number) {
this.node.getChildByName("show").active=true

View File

@@ -11,8 +11,7 @@ import { HeroSet } from "../common/config/heroSet";
import { MonModelComp } from "../hero/MonModelComp";
import { MBSet, Missions,} from "../common/config/MissionSet";
import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
import { HCard } from "./HCard";
import { HCardComp } from "./HCardComp";
import { VictoryComp } from "./VictoryComp";
import { ItemComp } from "./ItemComp";
import { MSkillComp } from "./MSkillComp";
@@ -89,7 +88,6 @@ export class MissionComp extends CCComp {
}
private cleanComponents() {
ecs.query(ecs.allOf(HeroSkillsComp)).forEach(entity => {entity.remove(HeroSkillsComp);entity.destroy()});
ecs.query(ecs.allOf(HCardComp)).forEach(entity => {entity.remove(HCardComp);entity.destroy()});
ecs.query(ecs.allOf(HeroViewComp)).forEach(entity => {entity.remove(HeroViewComp);entity.destroy()});
}

View File

@@ -1,7 +1,6 @@
import { _decorator, v3, Vec3 } 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 { HCard } from "./HCard";
import { BoxSet } from "../common/config/BoxSet";
import { HeroSet } from "../common/config/heroSet";
import { Hero } from "../hero/Hero";