增加新版出战卡组选定功能和删除功能
This commit is contained in:
@@ -136,7 +136,6 @@ namespace TcgEngine.UI
|
||||
hidden = false;
|
||||
if(this.title!=null)
|
||||
this.title.text = deck.title;
|
||||
|
||||
}
|
||||
|
||||
public void SetLine(string title)
|
||||
@@ -185,6 +184,47 @@ namespace TcgEngine.UI
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
|
||||
#region ================== 对象池友好接口 ==================
|
||||
/// <summary>
|
||||
/// 重置数据并隐藏
|
||||
/// </summary>
|
||||
public void ResetLine()
|
||||
{
|
||||
card = null;
|
||||
variant = null;
|
||||
deck = null;
|
||||
udeck = null;
|
||||
hidden = true;
|
||||
hover = false;
|
||||
|
||||
if (title) title.text = "";
|
||||
if (value) { value.text = ""; value.enabled = false; }
|
||||
if (cost) cost.value = 0;
|
||||
if (image) image.enabled = false;
|
||||
if (frame) frame.enabled = false;
|
||||
if (delete_btn) delete_btn.SetVisible(false);
|
||||
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 刷新用户自定义牌组
|
||||
/// </summary>
|
||||
public void Refresh(UserData udata, UserDeckData udeck)
|
||||
{
|
||||
SetLine(udata, udeck);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 刷新单卡
|
||||
/// </summary>
|
||||
public void Refresh(CardData card, VariantData variant, int quantity, bool invalid = false)
|
||||
{
|
||||
SetLine(card, variant, quantity, invalid);
|
||||
}
|
||||
|
||||
#endregion
|
||||
public CardData GetCard()
|
||||
{
|
||||
return card;
|
||||
|
||||
Reference in New Issue
Block a user