Show cards in PlayArea

This commit is contained in:
henriquenakashima 2020-09-19 21:18:27 -04:00
parent d67a7372c9
commit 8b33f3ff5a
6 changed files with 70 additions and 16 deletions

View file

@ -74,12 +74,12 @@ public class BattleController : MonoBehaviour, IBattleEffectApplier, IBattleEffe
}
this.heroDeck = new HeroDeck(this.cardIds, cardOwners);
this.battlePlayerControls.Init(this.heroDeck);
this.playArea = new PlayArea();
this.battlePlayerControls.Init(this.heroDeck, this.playArea);
this.battlePlayerControls.OnCardUsed += this.NotifyCardUsed;
this.battlePlayerControls.OnTurnPassed += this.NotifyTurnPassed;
this.heroDeck.OnHandPileChanged += this.battlePlayerControls.NotifyHandPileChanged;
this.playArea = new PlayArea();
}
private BattleParticipant FindHeroByClass(HeroId heroId) {
@ -139,7 +139,6 @@ public class BattleController : MonoBehaviour, IBattleEffectApplier, IBattleEffe
}
public void NotifyCardUsed(BaseCard card) {
Debug.Log("NotifyCardUsed " + card);
if (!CanUseCard(card)) {
throw new System.InvalidOperationException("Cannot use card " + card.GetDisplayName());
}
@ -159,7 +158,6 @@ public class BattleController : MonoBehaviour, IBattleEffectApplier, IBattleEffe
public void NotifyTurnPassed() {
if (this.heroTurn) {
Debug.Log("NotifyTurnPassed");
StartEnemyTurn();
}
}