dd
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import { _decorator, Label } from "cc";
|
||||
import { _decorator, Color, Label, Sprite } from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { HeroHomeComp } from "../map/HeroHomeComp";
|
||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { HeroInfo } from "../common/config/heroSet";
|
||||
import { ColorSet } from "../common/config/BoxSet";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -38,6 +40,7 @@ export class HeroCardComp extends CCComp {
|
||||
this.node.getChildByName("show").active=val
|
||||
}
|
||||
update_data(){
|
||||
|
||||
let slv = this.node.getChildByName("slv")
|
||||
this.node.getChildByName("lv").getComponent(Label).string=smc.heros[this.h_uuid].lv.toString()+"级"
|
||||
if(smc.heros[this.h_uuid].slv==0){
|
||||
@@ -48,7 +51,17 @@ export class HeroCardComp extends CCComp {
|
||||
this.node.getChildByName("lock").active=false
|
||||
slv.getChildByName("slv").getComponent(Label).string=smc.heros[this.h_uuid].slv.toString()
|
||||
}
|
||||
|
||||
switch(HeroInfo[this.h_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;
|
||||
}
|
||||
}
|
||||
/** 全局消息逻辑处理 */
|
||||
// private onHandler(event: string, args: any) {
|
||||
|
||||
Reference in New Issue
Block a user