mixedcards/Assets/Battle/UI/DiscardPileUI.cs
2020-09-19 16:06:08 -04:00

19 lines
527 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DiscardPileUI : MonoBehaviour
{
public Text text;
public BattleController battleController;
void Start() {
this.battleController.GetHeroDeck().OnDiscardPileChanged += NotifyDiscardPileChanged;
NotifyDiscardPileChanged();
}
public void NotifyDiscardPileChanged() {
text.text = "Discard pile: " + this.battleController.GetHeroDeck().GetDiscardPile().Count;
}
}