复制的数据 删除后的 代码需要注意

This commit is contained in:
2024-09-24 16:20:06 +08:00
parent 61a1188865
commit ecc7ba9621
9 changed files with 4477 additions and 3626 deletions

View File

@@ -53,7 +53,9 @@ export class MapMonsterComp extends CCComp {
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("do_add_hero", this.on_do_add_hero, this);
oops.message.on("normal_call", this.on_normal_call, this);
}
start() {
// this.scene = this.getComponent(MapViewScene);
@@ -99,6 +101,10 @@ export class MapMonsterComp extends CCComp {
// }
// this.shuaxin(dt)
}
on_normal_call(){
let hero:any =RandomManager.instance.getRandomByObjectList(smc.cards, 1);
this.addHero(hero[0].uuid)
}
monster_refresh(){
if (this.setp_num <= 0){
return