MOD!
This commit is contained in:
32
Assets/Scripts/MainGame/UI/CombatMainPage/PileBase.cs
Normal file
32
Assets/Scripts/MainGame/UI/CombatMainPage/PileBase.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace Continentis.MainGame.UI
|
||||
{
|
||||
public class PileBase : UIElementBase
|
||||
{
|
||||
public List<CardViewBase> cardViews;
|
||||
|
||||
public virtual void AddCard(CardViewBase cardObject)
|
||||
{
|
||||
cardViews.Add(cardObject);
|
||||
cardObject.transform.SetParent(rectTransform);
|
||||
|
||||
}
|
||||
|
||||
public virtual void InsertCard(CardViewBase cardObject, int index)
|
||||
{
|
||||
cardViews.Insert(index, cardObject);
|
||||
cardObject.transform.SetParent(rectTransform);
|
||||
cardObject.transform.SetSiblingIndex(index);
|
||||
}
|
||||
|
||||
public virtual void RemoveCard(CardViewBase cardObject)
|
||||
{
|
||||
cardViews.Remove(cardObject);
|
||||
//Debug.Log($"Removed {cardObject.cardInstance.cardLogic.contentSubmodule.cardName} from {this.name}" );
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user