public void BeDimColor() { Color color = ClientUtils.HTMLColorToColor(CardInfo.GetCardColor()); ChangeMainBoardColor(new Color(color.r / 3, color.g / 3, color.b / 3, color.a)); ChangePictureColor(new Color(0.3f, 0.3f, 0.3f)); }
public virtual void Initiate(CardInfo_Base cardInfo, ClientPlayer clientPlayer) { ClientPlayer = clientPlayer; CardInfo = cardInfo; ChangeColor(ClientUtils.HTMLColorToColor(CardInfo.GetCardColor())); BeBrightColor(); }
public void Initialize(CardInfo_Base cardInfo, UnityAction <int> onMoveUp, UnityAction <int> onMoveDown, UnityAction <int> onRemove) { CardInfo = cardInfo; CardName.text = CardInfo.BaseInfo.CardNames[LanguageManager.Instance.GetCurrentLanguage()]; Color cardColor = ClientUtils.HTMLColorToColor(CardInfo.GetCardColor()); CardBGImage.color = cardColor; ClientUtils.ChangeImagePicture(CardImage, CardInfo.BaseInfo.PictureID); StarsGroup.SetStarNumber(CardInfo.UpgradeInfo.CardLevel, CardInfo.UpgradeInfo.CardLevelMax); MoveUpButton.onClick.RemoveAllListeners(); MoveDownButton.onClick.RemoveAllListeners(); RemoveButton.onClick.RemoveAllListeners(); MoveUpButton.onClick.AddListener(delegate { onMoveUp(CardInfo.CardID); }); MoveDownButton.onClick.AddListener(delegate { onMoveDown(CardInfo.CardID); }); RemoveButton.onClick.AddListener(delegate { onRemove(CardInfo.CardID); }); }