初步 修改英雄信息

This commit is contained in:
2025-02-26 16:18:40 +08:00
parent 94b8c992da
commit 5279a65284
5 changed files with 2597 additions and 2726 deletions

View File

@@ -2037,7 +2037,7 @@
"__id__": 1
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 89
@@ -2211,7 +2211,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -91.694,
"y": -42.694,
"z": 0
},
"_lrot": {
@@ -2749,7 +2749,7 @@
"__id__": 117
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 123
@@ -3049,7 +3049,7 @@
"__id__": 1
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 131
@@ -3208,7 +3208,7 @@
"__id__": 1
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 137
@@ -3367,7 +3367,7 @@
"__id__": 1
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 143
@@ -3666,7 +3666,7 @@
"__id__": 155
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 165

View File

@@ -1037,10 +1037,10 @@
"height": 148,
"rawWidth": 171,
"rawHeight": 148,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"borderTop": 18,
"borderBottom": 59,
"borderLeft": 24,
"borderRight": 20,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
@@ -1083,10 +1083,10 @@
"height": 148,
"rawWidth": 171,
"rawHeight": 148,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"borderTop": 12,
"borderBottom": 56,
"borderLeft": 23,
"borderRight": 19,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
@@ -1129,10 +1129,10 @@
"height": 148,
"rawWidth": 171,
"rawHeight": 148,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"borderTop": 39,
"borderBottom": 62,
"borderLeft": 36,
"borderRight": 32,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,

File diff suppressed because it is too large Load Diff

View File

@@ -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() {

View File

@@ -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();
}