Create BattleResult

This commit is contained in:
henriquenakashima 2020-09-26 23:10:36 -04:00
parent 0d7f4f4954
commit 84782a9bb3
4 changed files with 46 additions and 4 deletions

View file

@ -389,11 +389,11 @@ public class BattleController : MonoBehaviour, IBattleEffectApplier, IBattleEffe
foreach (BattleParticipant p in this.monsters) {
p.CheckState();
}
if (System.Array.TrueForAll(this.heroes, h => !h.IsAlive())) {
Debug.Log("You lost!");
}
if (System.Array.TrueForAll(this.monsters, m => !m.IsAlive())) {
Debug.Log("You won!");
BattleResult.FinishBattle(new BattleResult(false));
} else if (System.Array.TrueForAll(this.monsters, m => !m.IsAlive())) {
BattleResult.FinishBattle(new BattleResult(true));
}
}