界面调整
This commit is contained in:
@@ -40,17 +40,17 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
};
|
||||
/** 游戏主角 */
|
||||
heros:any={
|
||||
5001:{uuid:5001,lv:1,exp:0,slv:1,num:100,x1:10},
|
||||
5002:{uuid:5002,lv:2,exp:0,slv:0,num:80,x1:0},
|
||||
5003:{uuid:5003,lv:3,exp:0,slv:0,num:90,x1:0},
|
||||
5001:{uuid:5001,lv:1,exp:0,slv:1,num:100,x1:0},
|
||||
5002:{uuid:5002,lv:2,exp:0,slv:1,num:80,x1:0},
|
||||
5003:{uuid:5003,lv:3,exp:0,slv:1,num:90,x1:0},
|
||||
5004:{uuid:5004,lv:1,exp:0,slv:1,num:100,x1:0},
|
||||
5005:{uuid:5005,lv:2,exp:0,slv:0,num:80,x1:0},
|
||||
5006:{uuid:5006,lv:3,exp:0,slv:0,num:90,x1:0},
|
||||
5007:{uuid:5007,lv:3,exp:0,slv:0,num:90,x1:0},
|
||||
5008:{uuid:5008,lv:3,exp:0,slv:0,num:90,x1:0},
|
||||
5009:{uuid:5009,lv:3,exp:0,slv:0,num:90,x1:0},
|
||||
5010:{uuid:5010,lv:3,exp:0,slv:0,num:90,x1:0},
|
||||
5011:{uuid:5011,lv:3,exp:0,slv:0,num:90,x1:0},
|
||||
5005:{uuid:5005,lv:2,exp:0,slv:1,num:80,x1:0},
|
||||
5006:{uuid:5006,lv:3,exp:0,slv:1,num:90,x1:0},
|
||||
5007:{uuid:5007,lv:3,exp:0,slv:1,num:90,x1:0},
|
||||
5008:{uuid:5008,lv:3,exp:0,slv:1,num:90,x1:0},
|
||||
5009:{uuid:5009,lv:3,exp:0,slv:1,num:90,x1:0},
|
||||
5010:{uuid:5010,lv:3,exp:0,slv:1,num:90,x1:0},
|
||||
5011:{uuid:5011,lv:3,exp:0,slv:1,num:90,x1:0},
|
||||
};
|
||||
goods:any=[
|
||||
{uuid:9001,num:100000,type:0,cost:0,inventory:5},
|
||||
@@ -60,8 +60,8 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
];
|
||||
items:any={
|
||||
1001:{uuid:1001,num:10,x1:1},
|
||||
1002:{uuid:1002,num:10,x1:0},
|
||||
1003:{uuid:1003,num:10,x1:0},
|
||||
1002:{uuid:1002,num:10,x1:1},
|
||||
1003:{uuid:1003,num:10,x1:1},
|
||||
1004:{uuid:1004,num:1000,x1:0},
|
||||
1005:{uuid:1005,num:1000,x1:0},
|
||||
1006:{uuid:1006,num:1000,x1:0},
|
||||
@@ -75,6 +75,8 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
1014:{uuid:1014,num:1000,x1:0},
|
||||
1015:{uuid:1015,num:1000,x1:0},
|
||||
1016:{uuid:1016,num:1000,x1:0},
|
||||
9001:{uuid:9001,num:1000,x1:1000},
|
||||
9003:{uuid:9003,num:1000,x1:2000},
|
||||
};
|
||||
fight_heros=[5001]
|
||||
mheros:any = [];
|
||||
|
||||
@@ -19,7 +19,7 @@ export class HChipComp extends Component {
|
||||
|
||||
}
|
||||
show_info(){
|
||||
if(this.node.parent.name=="reward") return
|
||||
if(this.node.parent.name=="reward"||this.node.parent.name=="item_info") return
|
||||
oops.gui.open(UIID.ItemInfo, {uuid:this.h_uuid,type:2});
|
||||
}
|
||||
|
||||
@@ -35,17 +35,10 @@ export class HChipComp extends Component {
|
||||
}else{
|
||||
this.node.getChildByName("num").getComponent(Label).string = "";
|
||||
}
|
||||
switch(HeroInfo[uuid].quality){
|
||||
case 1:
|
||||
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["BLUE"]);
|
||||
break;
|
||||
case 2:
|
||||
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["YELLOW"]);
|
||||
break;
|
||||
case 3:
|
||||
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["RED"]);
|
||||
break;
|
||||
}
|
||||
this.node.getChildByName("g1").active=HeroInfo[uuid].quality==1
|
||||
this.node.getChildByName("g2").active=HeroInfo[uuid].quality==2
|
||||
this.node.getChildByName("g3").active=HeroInfo[uuid].quality==3
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user