界面调整

This commit is contained in:
panw
2025-01-02 10:32:41 +08:00
parent fdec4ef47b
commit 7d677ad5b1
11 changed files with 578 additions and 823 deletions

View File

@@ -6,6 +6,8 @@ import { UIID } from "../common/config/GameUIConfig";
import { Items } from "../common/config/Items";
import { SkillSet } from "../common/config/SkillSet";
import { HeroInfo, HeroSet } from "../common/config/heroSet";
import { Hero } from "../hero/Hero";
import { HChipComp } from "../hero/HChipComp";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@@ -61,14 +63,11 @@ export class ItemInfoComp extends CCComp {
}
if(args.type==2){ //英雄碎片
this.node.getChildByName("hero").active = true
this.node.getChildByName("hero").active = true;
this.node.getChildByName("name").getComponent(Label).string=HeroInfo[args.uuid].name+" 碎片"
this.node.getChildByName("info").getComponent(Label).string="「"+HeroInfo[args.uuid].name+"」碎片,用于英雄升阶"
var icon_path = "game/heros/herois"
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
const sprite = this.node.getChildByName("hero").getChildByName("hero").getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[args.uuid].path);
});
let HChip=this.node.getChildByName("hero").getComponent(HChipComp);
HChip.update_data(args.uuid)
}
}

View File

@@ -77,8 +77,22 @@ export class MissionHomeComp extends CCComp {
let height=Math.ceil(hc / 4)*135
parent.getComponent(UITransform).height=height
for (let i = 0; i < hc; i++) {
if (HeroInfo[HeroList[i]].quality==3) {
let hcc =ecs.getEntity<HeroSelect>(HeroSelect)
hcc.load(HeroList[i],parent)
}
}
for (let i = 0; i < hc; i++) {
if (HeroInfo[HeroList[i]].quality==2) {
let hcc =ecs.getEntity<HeroSelect>(HeroSelect)
hcc.load(HeroList[i],parent)
}
}
for (let i = 0; i < hc; i++) {
if (HeroInfo[HeroList[i]].quality==1) {
let hcc =ecs.getEntity<HeroSelect>(HeroSelect)
hcc.load(HeroList[i],parent)
}
}
this.update_hero_cards()
}