商品页完成+ 英雄uuid 5000起步,技能6000起步,物品1000起步,金币9001

This commit is contained in:
2024-12-24 15:41:52 +08:00
parent ca54b0a3da
commit 228112b4ed
17 changed files with 4219 additions and 4154 deletions

View File

@@ -91,7 +91,6 @@ export class MissionHomeComp extends CCComp {
for(let i=0;i<loaded.length;i++){
if(smc.heros[loaded[i].HeroSelectComp.h_uuid].slv ==0 ) {
loaded[i].HeroSelectComp.node.active=false
console.log("loaded[i].HeroSelectComp",loaded[i].HeroSelectComp)
}else{
loaded[i].HeroSelectComp.node.active=true
}
@@ -138,13 +137,13 @@ export class MissionHomeComp extends CCComp {
}
}
call_hero(h_uuid:number,index:number){
console.log("call hero",h_uuid,HeroInfo[h_uuid])
var path = "game/heros/uiheros/"+HeroInfo[h_uuid].path;
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
var scene = smc.map.MapView.scene;
node.parent = scene.entityLayer!.node!
node.setPosition(this.heros_pos[index].px,BoxSet.GAME_LINE,0);
console.log("this.heros_pos[index].px",this.heros_pos[index].px)
let comp = node.getComponent(UiHeroComp)
comp.h_uuid = h_uuid
this.heros.push(comp)