Move heroDeck and monsterDeck into BattleState

This commit is contained in:
henriquenakashima 2020-10-13 00:58:33 -04:00
parent f1ef7d7d46
commit 12eb97084f
4 changed files with 45 additions and 44 deletions

View file

@ -9,11 +9,11 @@ public class DiscardPileUI : MonoBehaviour
public BattleController battleController;
void Start() {
this.battleController.GetHeroDeck().OnDiscardPileChanged += NotifyDiscardPileChanged;
this.battleController.State.HeroDeck.OnDiscardPileChanged += NotifyDiscardPileChanged;
NotifyDiscardPileChanged();
}
public void NotifyDiscardPileChanged() {
text.text = "Discard pile: " + this.battleController.GetHeroDeck().GetDiscardPile().Count;
text.text = "Discard pile: " + this.battleController.State.HeroDeck.GetDiscardPile().Count;
}
}

View file

@ -9,11 +9,11 @@ public class DrawPileUI : MonoBehaviour
public BattleController battleController;
void Start() {
this.battleController.GetHeroDeck().OnDrawPileChanged += NotifyDrawPileChanged;
this.battleController.State.HeroDeck.OnDrawPileChanged += NotifyDrawPileChanged;
NotifyDrawPileChanged();
}
public void NotifyDrawPileChanged() {
text.text = "Draw pile: " + this.battleController.GetHeroDeck().GetDrawPile().Count;
text.text = "Draw pile: " + this.battleController.State.HeroDeck.GetDrawPile().Count;
}
}