示例#1
0
    public void RefreshCardAllColors()
    {
        Color cardColor = ClientUtils.HTMLColorToColor(CardInfo.GetCardColor());

        CardDescComponent?.SetCardDescTextColor(ClientUtils.HTMLColorToColor(AllColors.ColorDict[AllColors.ColorType.CardDescTextColor]));
        ChangeMainBoardColor(cardColor);
        CardDescComponent?.SetCardTypeTextColor(ClientUtils.ChangeColorToWhite(cardColor, 0.3f));
        SetCardBackColor();
        ChangeCardBloomColor(ClientUtils.GetColorFromColorDict(AllColors.ColorType.CardBloomColor), AllColors.IntensityDict[AllColors.ColorType.CardBloomColor]);
    }
示例#2
0
    public override void Initialize(Bonus bonus)
    {
        base.Initialize(bonus);
        IconImageContainer.SetActive(true);
        CardImageContainer.SetActive(false);
        switch (bonus.BonusType)
        {
        case Bonus.BonusTypes.LifeUpperLimit:
        {
            ItemImage.sprite         = LifeIcon;
            ItemImage.color          = ClientUtils.GetColorFromColorDict(AllColors.ColorType.LifeIconColor);
            ItemImage.preserveAspect = true;
            break;
        }

        case Bonus.BonusTypes.EnergyUpperLimit:
        {
            ItemImage.sprite         = EnergyIcon;
            ItemImage.color          = ClientUtils.GetColorFromColorDict(AllColors.ColorType.EnergyIconColor);
            ItemImage.preserveAspect = true;
            break;
        }

        case Bonus.BonusTypes.Budget:
        {
            ItemImage.sprite         = BudgetIcon;
            ItemImage.color          = Color.white;
            ItemImage.preserveAspect = true;
            break;
        }

        case Bonus.BonusTypes.UnlockCardByID:
        {
            IconImageContainer.SetActive(false);
            CardImageContainer.SetActive(true);
            ClientUtils.ChangeImagePicture(CardImage, BonusCardInfo.BaseInfo.PictureID);
            CardImage.color          = Color.white;
            CardImageBorder.color    = ClientUtils.ChangeColorToWhite(ClientUtils.HTMLColorToColor(BonusCardInfo.GetCardColor()), 0.5f);
            CardImage.preserveAspect = true;
            break;
        }
        }
    }