界面调整
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user