Max energy increases with turns
This commit is contained in:
parent
abf17d8d14
commit
fc427bd276
2 changed files with 8 additions and 2 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
heroIds: 010000000000000002000000
|
||||
monsterIds: 000000000100000000000000
|
||||
maxEnergy: 6
|
||||
maxEnergy: 1
|
||||
cardIds: 00000000000000000000000000000000000000000100000001000000010000000100000001000000
|
||||
heroUIPrefab: {fileID: 6641511084601005557, guid: ef1b469b45cedee418e4c4adf577cd00,
|
||||
type: 3}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue