切换牌组封面
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user