商店商品++

This commit is contained in:
panfudan
2025-08-20 23:27:32 +08:00
parent 77075b2650
commit 0a654d130a
12 changed files with 5836 additions and 3641 deletions

View File

@@ -1,4 +1,4 @@
import { _decorator, Component, instantiate, Node, Prefab } from 'cc';
import { _decorator, Component, instantiate, Node, Prefab, UITransform, Vec3 } from 'cc';
import { oops } from 'db://oops-framework/core/Oops';
import { HCardUICom } from './HCardUICom';
import { smc } from '../common/SingletonModuleComp';
@@ -22,8 +22,9 @@ export class HeroSelectCom extends Component {
}
update_heros(){
let heros=smc.getHasHeroUUID()
console.log("[HeroPageComp]:update_heros",heros)
let width= heros.length*235+30
let width= heros.length*230+20
this.node.getChildByName("main").getChildByName("view").getChildByName("heros").getComponent(UITransform).setContentSize(width,320)
console.log("[HeroPageComp]:UITransform width",this.node.getChildByName("main").getChildByName("view").getChildByName("heros").getComponent(UITransform))
for(let i=0;i<heros.length;i++){
let hero=heros[i]
console.log("[HeroPageComp]:hero",hero)