Max energy increases with turns

This commit is contained in:
henriquenakashima 2020-09-19 16:12:35 -04:00
parent abf17d8d14
commit fc427bd276
2 changed files with 8 additions and 2 deletions

View file

@ -6,7 +6,6 @@ public class BattleController : MonoBehaviour
{
public HeroId[] heroIds;
public MonsterId[] monsterIds;
public int maxEnergy;
public CardId[] cardIds;
public HeroInfoUI heroUIPrefab;
@ -24,6 +23,7 @@ public class BattleController : MonoBehaviour
private HeroInfoUI[] monsterUIs;
private bool heroTurn;
private int maxEnergy;
private int energy;
void Awake() {
@ -100,12 +100,18 @@ public class BattleController : MonoBehaviour
private void StartHeroTurn() {
this.heroTurn = true;
this.energy = this.maxEnergy;
foreach (BattleHero hero in this.heroes) {
hero.ResetBlock();
}
this.heroDeck.DrawHand();
this.battlePlayerControls.NotifyHandPileChanged();
if (this.maxEnergy < 9) {
this.maxEnergy++;
this.energy++;
}
}
private void StartEnemyTurn() {