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.State.HeroDeck.OnDiscardPileChanged += NotifyDiscardPileChanged; NotifyDiscardPileChanged(); } public void NotifyDiscardPileChanged() { text.text = "Discard pile: " + this.battleController.State.HeroDeck.GetDiscardPile().Count; } }