云环境和本地调试 添加
This commit is contained in:
@@ -126,31 +126,8 @@ export class MissionHeroCompComp extends CCComp {
|
||||
hero.load(pos,scale,uuid);
|
||||
}
|
||||
|
||||
get_info_and_remove(fight_pos:number,uuid:number){
|
||||
let info:any={ap:0,hp:0,lv:1,crit:0,crit_d:0,dod:0,dod_no:false,crit_no:false}
|
||||
let heros=ecs.query(ecs.allOf(HeroModelComp))
|
||||
if(heros.length>0){
|
||||
let hero = heros[0]
|
||||
let hv = hero.get(HeroViewComp)
|
||||
info.ap=hv.ap
|
||||
info.hp=hv.hp_max
|
||||
info.lv=hv.lv
|
||||
info.crit=hv.crit
|
||||
info.crit_d=hv.crit_d
|
||||
info.dod=hv.dod
|
||||
info.dod_no=hv.dod_no
|
||||
info.crit_no=hv.crit_no
|
||||
hero.destroy()
|
||||
return info
|
||||
|
||||
}
|
||||
return info
|
||||
}
|
||||
|
||||
do_hero_change(){
|
||||
//金币加1
|
||||
smc.vmdata.mission_data.gold+=1
|
||||
}
|
||||
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
|
||||
Reference in New Issue
Block a user