virtual protected void CheckBattleEnd() { if (IsBattleStart == false) { return; } if (IsBattleEnd == false) { bool battle_end = true; if (TimeLeft <= 0) { battleEndType = pe_EndBattle.Timeout; } else if (enemies.All(c => c == null || c.IsDead == true)) { battleEndType = pe_EndBattle.Win; } else if (characters.All(c => c.IsDead == true)) { battleEndType = pe_EndBattle.Lose; } else { battle_end = false; } if (battle_end == true) { battleEndLeftTime = TimeLeft; IsBattleEnd = battle_end; } } if (m_LightingCreatures.Count > 0 || characters.Any(c => c.Character.IsPlayingActionAnimation) || enemies.Any(c => c != null && c.Character.IsPlayingActionAnimation)) { return; } if (IsBattleEnd == true) { SetBattleEnd(); } }
public void SetBattleExit() { Clear(); battleEndType = pe_EndBattle.Exit; SetBattleEnd(); }