横竖版展示逻辑
This commit is contained in:
@@ -35,8 +35,8 @@ namespace TcgEngine.UI
|
||||
|
||||
// 卡组展示管理
|
||||
public int card_lines_size = 12;
|
||||
public List<DeckLine> card_pool = new List<DeckLine>();
|
||||
public List<DeckLine> card_lines = new List<DeckLine>();
|
||||
public List<CardUI> card_pool = new List<CardUI>();
|
||||
public List<CardUI> card_lines = new List<CardUI>();
|
||||
|
||||
|
||||
private UserData lastUserData;
|
||||
@@ -65,7 +65,7 @@ namespace TcgEngine.UI
|
||||
for (int i = 0; i < card_lines_size; i++)
|
||||
{
|
||||
GameObject card = Instantiate(card_lines_prefab, deck_display_grid.transform);
|
||||
DeckLine line = card.GetComponent<DeckLine>();
|
||||
CardUI line = card.GetComponent<CardUI>();
|
||||
line.gameObject.SetActive(false);
|
||||
card_pool.Add(line);
|
||||
}
|
||||
@@ -165,12 +165,12 @@ namespace TcgEngine.UI
|
||||
for (int i = 0; i < udeck.cards.Length; i++)
|
||||
{
|
||||
UserCardData ucard = udeck.cards[i];
|
||||
DeckLine line = card_pool[i];
|
||||
CardUI line = card_pool[i];
|
||||
|
||||
CardData cdata = CardData.Get(ucard.tid);
|
||||
VariantData variant = VariantData.Get(ucard.variant);
|
||||
|
||||
line.Refresh(cdata, variant, ucard.quantity);
|
||||
line.Refresh(cdata, variant);
|
||||
line.gameObject.SetActive(true);
|
||||
card_lines.Add(line);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user