This commit is contained in:
2025-01-02 00:00:05 +08:00
parent 1df06c791f
commit fdec4ef47b
68 changed files with 63931 additions and 22650 deletions

View File

@@ -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;
}
}
}