永久数据不再mvvm显示

This commit is contained in:
2025-08-20 14:02:14 +08:00
parent dbe2da2927
commit b531948d4d
16 changed files with 519 additions and 509 deletions

View File

@@ -124,7 +124,6 @@ export class HeroViewComp extends CCComp {
onLoad() {
this.as = this.getComponent(HeroSpine);
//console.log("[HeroViewComp]:hero view comp ",this.FIGHTCON)
this.on(GameEvent.EXPUP,this.exp_up,this)
this.on(GameEvent.HeroLvUp,this.to_update_lv,this)
this.on(GameEvent.FightEnd,this.do_fight_end,this)
const collider = this.node.getComponent(BoxCollider2D);
@@ -280,6 +279,7 @@ export class HeroViewComp extends CCComp {
for(let i=0;i<drop_item.length;i++){
let d_item=drop_item[i]
smc.addItem(d_item.item_uuid,d_item.count)
}
}
if(exp>0){
@@ -287,9 +287,11 @@ export class HeroViewComp extends CCComp {
}
if(gold>0){
smc.addGold(gold)
oops.message.dispatchEvent(GameEvent.GOLD_UPDATE)
}
if(diamond>0){
smc.addDiamond(diamond)
oops.message.dispatchEvent(GameEvent.DIAMOND_UPDATE)
}
console.log("[HeroViewComp]:do_drop",this.hero_uuid,drop_item,exp,gold,diamond)
}
@@ -528,11 +530,7 @@ export class HeroViewComp extends CCComp {
//console.log("[HeroViewComp]:crit",crit)
return false
}
// dead(){
// this.BUFFCOMP.dead()
// this.to_drop()
// }
do_dead_trigger(){ //死亡特殊处理
if(this.is_dead||this.fac==FacSet.MON) return
@@ -556,13 +554,7 @@ export class HeroViewComp extends CCComp {
// this.node.setPosition(HeroPos[this.fight_pos].pos)
// this.BUFFCOMP.heathed()
// }
//掉落物品
to_drop(){
// let Drops = getMonsterDrops(1, MonsterType.Normal, 1.2);
// if(this.is_boss) Drops =getMonsterDrops(1, MonsterType.Elite, 1.2);
// if(this.is_big_boss) Drops =getMonsterDrops(1, MonsterType.Boss, 1.2);
}
to_console(value:any,value2:any=null,value3:any=null){
//console.log("["+this.scale+this.hero_name+']'+value,value2,value3)
}
@@ -592,10 +584,7 @@ export class HeroViewComp extends CCComp {
}
}
exp_up(e:any,data:any){
}
to_update_lv(event:string,data:any){
if(this.fac==FacSet.MON) return