hero 界面调整 局内英雄不再升级,改为升级局内技能

This commit is contained in:
2024-11-19 15:15:05 +08:00
parent e89f590979
commit e6f4a8085b
10 changed files with 188 additions and 151 deletions

View File

@@ -58,18 +58,10 @@ export class MissionComp extends CCComp {
mon_index:number = 0
onLoad(){
// 监听全局事件
oops.message.on("other_add_monster", this.on_other_add_monster, this);
oops.message.on("do_add_hero", this.on_do_add_hero, this);
oops.message.on("mission_start", this.mission_start, this);
oops.message.on("mission_end", this.mission_end, this);
oops.message.on("mon_dead", this.on_mon_dead, this);
}
start() {
this.hcard_call()
}
protected update(dt: number): void {
@@ -174,18 +166,6 @@ export class MissionComp extends CCComp {
oops.message.dispatchEvent("do_reward");
}
private on_other_add_monster(event: string, args: any) {
var scene = smc.map.MapView.scene;
let pos:Vec3 = v3(BoxSet.MONSTER_START,BoxSet.GAME_LINE)
let monster_layer = scene.entityLayer!.node!
this.addMonster(args.uuid)
}
check_mon_count(){
let count = 0;
let list = ecs.query(ecs.allOf(MonModelComp));
count = list.length
return count;
}
count_mon_pos(){
let monsters:any= ecs.query(ecs.allOf(MonModelComp));
for(let i=0;i<monsters.length;i++){
@@ -203,9 +183,7 @@ export class MissionComp extends CCComp {
}
}
private on_do_add_hero(event: string, args: any) {
this.addHero(args.uuid)
}
heros_call(){
let hero:any =RandomManager.instance.getRandomByObjectList(smc.cards, 1);
this.addHero(hero[0].uuid)