删掉了role 场景技能 基本完成

This commit is contained in:
pan@work
2024-11-20 17:00:34 +08:00
parent f66f34ea41
commit ff7b0b545b
33 changed files with 7618 additions and 9329 deletions

View File

@@ -1,7 +1,9 @@
import { instantiate, Prefab } from "cc";
import { instantiate, Prefab, v3 } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { MSkillComp } from "./MSkillComp";
import { smc } from "../common/SingletonModuleComp";
import { BoxSet } from "../common/config/BoxSet";
/** MSkill 模块 */
@ecs.register(`MSkill`)
@@ -12,13 +14,21 @@ export class MSkill extends ecs.Entity {
protected init() {
// this.addComponents<ecs.Comp>();
}
load(uuid:number=1001,index:number=-1,parent:any) {
let box_group= 0
var path = "game/skills/mskill";
load(box_group:number=0,uuid:number=1001) {
var path = "game/hero/mskill";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
node.parent = parent
let entityLayer =smc.map.MapView.scene.entityLayer!.node!
node.parent = entityLayer
let pos=v3(-300,245)
if(box_group==BoxSet.MONSTER){
pos.x=300
// node.setScale(-1,1)
}
node.setPosition(pos)
var msc = node.getComponent(MSkillComp)!;
msc.msk_uuid = uuid
msc.box_group = box_group
this.add(msc)
}
/** 模块资源释放 */