初步 修改英雄信息
This commit is contained in:
@@ -58,9 +58,14 @@ export class CardControllerComp extends CCComp {
|
||||
mission_to_mission_home(){
|
||||
let mission_home=this.node.getChildByName("mission_home").getComponent(MissionHomeComp)
|
||||
this.node.getChildByName("mission_home").active = true
|
||||
let mission=this.node.getChildByName("mission")
|
||||
mission.active = false
|
||||
mission_home.load_ui_heros()
|
||||
}
|
||||
|
||||
show_hero_home(){
|
||||
let hero_home=this.node.getChildByName("hero_home")
|
||||
hero_home.active = true
|
||||
}
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ControllerComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
|
||||
@@ -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