修改了很多

This commit is contained in:
2025-03-27 23:25:10 +08:00
parent 3a15541170
commit 67704725b2
40 changed files with 9140 additions and 4253 deletions

View File

@@ -2,7 +2,7 @@ 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 { BoxSet } from "../common/config/BoxSet";
import { HeroList, HeroSet } from "../common/config/heroSet";
import { HeroInfo, HeroList, HeroSet } from "../common/config/heroSet";
import { Hero } from "../hero/Hero";
import { smc } from "../common/SingletonModuleComp";
import { Timer } from "db://oops-framework/core/common/timer/Timer";
@@ -25,6 +25,9 @@ export class MissionHeroCompComp extends CCComp {
protected update(dt: number): void {
if(smc.mission.status != 1) return
}
init(){
}
test_call(){
this.addHero(5010)
@@ -41,7 +44,8 @@ export class MissionHeroCompComp extends CCComp {
private addHero(uuid:number=1001,i:number=0) {
let hero = ecs.getEntity<Hero>(Hero);
let scale = 1
let pos:Vec3 = v3(HeroSet.StartPos[1]-i*10,BoxSet.GAME_LINE);
let y=RandomManager.instance.getRandomInt(0,HeroSet.Start_y.length,1)
let pos:Vec3 = v3(HeroSet.Start_x[HeroInfo[uuid].type],HeroSet.Start_y[y]);
hero.load(pos,scale,uuid);
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */