Reorganize Assets/Battle
This commit is contained in:
parent
3e0004d4cb
commit
abf17d8d14
20 changed files with 16 additions and 0 deletions
19
Assets/Battle/UI/DiscardPileUI.cs
Normal file
19
Assets/Battle/UI/DiscardPileUI.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue