DrawPileUI and DiscardPileUI
This commit is contained in:
parent
567b732f85
commit
05fee309c3
8 changed files with 338 additions and 7 deletions
19
Assets/Battle/DrawPileUI.cs
Normal file
19
Assets/Battle/DrawPileUI.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class DrawPileUI : MonoBehaviour
|
||||
{
|
||||
public Text text;
|
||||
public BattleController battleController;
|
||||
|
||||
void Start() {
|
||||
this.battleController.GetHeroDeck().OnDrawPileChanged += NotifyDrawPileChanged;
|
||||
NotifyDrawPileChanged();
|
||||
}
|
||||
|
||||
public void NotifyDrawPileChanged() {
|
||||
text.text = "Draw pile: " + this.battleController.GetHeroDeck().GetDrawPile().Count;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue