初步 修改英雄信息
This commit is contained in:
@@ -34,7 +34,9 @@ export class HeroHomeComp extends CCComp {
|
||||
loads(){
|
||||
let hc:number =HeroList.length
|
||||
let parent= this.node.getChildByName("heros").getChildByName("view").getChildByName("content")
|
||||
parent.getComponent(UITransform).setContentSize(720,Math.ceil(HeroList.length/4)*230)
|
||||
|
||||
parent.getComponent(UITransform).setContentSize(hc*185,230)
|
||||
// console.log("hc",hc,parent.getComponent(UITransform))
|
||||
console.log("parent",parent)
|
||||
for (let i = 0; i < hc; i++) {
|
||||
let hcc =ecs.getEntity<HeroCard>(HeroCard)
|
||||
@@ -248,6 +250,9 @@ export class HeroHomeComp extends CCComp {
|
||||
close_show(){
|
||||
this.node.getChildByName("show").active=false
|
||||
}
|
||||
close(){
|
||||
this.node.active=false
|
||||
}
|
||||
reset() {
|
||||
this.node.destroy();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user