切换牌组封面

This commit is contained in:
YiHan0621
2025-10-13 18:30:07 +08:00
parent f14b8d6ac6
commit e84768d8fb
8 changed files with 230 additions and 35 deletions

View File

@@ -132,7 +132,18 @@ namespace TcgEngine.UI
this.value.enabled = deck.GetQuantity() > 0;
if (this.value != null)
this.value.color = udata.IsDeckValid(deck) ? Color.white : Color.red;
if (this.image != null)
{
Debug.Log($"读取:{deck.cover}");
if (string.IsNullOrEmpty(deck.cover))
{
deck.cover = "fire";
CollectionPanel.Get().SaveDeckAPI(udata, deck);
}
CardCoverData cover = CardCoverData.Get(deck.cover);
this.image.enabled = true;
this.image.sprite = cover.GetCardCover();
}
gameObject.SetActive(true);
}