Create BattleResult
This commit is contained in:
parent
0d7f4f4954
commit
84782a9bb3
4 changed files with 46 additions and 4 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue