去掉大部分 调试信息

This commit is contained in:
2025-08-21 14:33:42 +08:00
parent 92faa0fe09
commit 213149881c
27 changed files with 164 additions and 164 deletions

View File

@@ -12,22 +12,22 @@ export class HeroSelectCom extends Component {
}
onAdded(args: any) {
console.log("[HeroSelectCom]:onAdded",args)
// console.log("[HeroSelectCom]:onAdded",args)
this.slot=args.slot
this.update_heros()
}
protected onDisable(): void {
console.log("[HeroSelectCom]:onDisable")
// console.log("[HeroSelectCom]:onDisable")
this.clear_heros()
}
update_heros(){
let heros=smc.getHasHeroUUID()
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))
// 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)
// console.log("[HeroPageComp]:hero",hero)
if(hero){
this.load_hero(hero)
}
@@ -37,13 +37,13 @@ export class HeroSelectCom extends Component {
clear_heros(){
let parent=this.node.getChildByName("main").getChildByName("view").getChildByName("heros")
let children=parent.children
console.log("[HeroPageComp]:clear_heros",children)
// console.log("[HeroPageComp]:clear_heros",children)
for(let i=0;i<children.length;i++){
children[i].destroy()
}
}
load_hero(uuid:number){
console.log("[HeroPageComp]:load_hero",uuid)
// console.log("[HeroPageComp]:load_hero",uuid)
let parent=this.node.getChildByName("main").getChildByName("view").getChildByName("heros")
let path = "game/gui/hcard"
const prefab = oops.res.get(path, Prefab);