24 lines
982 B
C#
24 lines
982 B
C#
using UnityEngine;
|
|
using UnityEngine.EventSystems;
|
|
|
|
namespace Continentis.MainGame.UI
|
|
{
|
|
public class ExhaustPile : PileBase, IPointerEnterHandler, IPointerExitHandler
|
|
{
|
|
public void OnPointerEnter(PointerEventData eventData)
|
|
{
|
|
string title = "Exhaust Pile";
|
|
string description = $"When you exhaust cards, they go here. Currently, it has {cardViews.Count} cards.\n" +
|
|
$"Exhausted cards are usually removed from play for the rest of the combat.";
|
|
RectTransform canvasTransform = CombatUIManager.Instance.combatMainPage.rectTransform;
|
|
Vector2 basePosition = canvasTransform.InverseTransformPoint(rectTransform.position);
|
|
InformationBox.Create(canvasTransform, ref infoBox).Initialize(title, description, basePosition);
|
|
}
|
|
|
|
public void OnPointerExit(PointerEventData eventData)
|
|
{
|
|
InformationBox.Despawn(ref infoBox);
|
|
}
|
|
}
|
|
}
|