dd
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { _decorator, Component, Label, Node, resources, Sprite, SpriteAtlas } from 'cc';
|
||||
import { _decorator, Color, Component, Label, Node, resources, Sprite, SpriteAtlas } from 'cc';
|
||||
import { HeroInfo } from '../common/config/heroSet';
|
||||
import { oops } from '../../../../extensions/oops-plugin-framework/assets/core/Oops';
|
||||
import { UIID } from '../common/config/GameUIConfig';
|
||||
import { Items } from '../common/config/Items';
|
||||
import { ColorSet } from '../common/config/BoxSet';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('HChipComp')
|
||||
@@ -34,6 +35,17 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user