protected virtual void CheckForGameOver(object sender, object args) { Unit deadUnit = args as Unit; if (!PartyAlive(deadUnit.alliance)) { Winner = deadUnit.alliance.GetOpposing(); print($"Winner: {Winner.ToString()}"); } }
void OnTurnCompleted(object sender, EventArgs e) { for (int i = 0; i < conditions.Count; ++i) { victor = conditions[i].Check(); if (victor != Alliances.Neutral) { if (victoryEvent != null) victoryEvent(this, EventArgs.Empty); Debug.Log("Battle concluded with victor: " + victor.ToString()); break; } } }
void OnTurnCompleted(object sender, EventArgs e) { for (int i = 0; i < conditions.Count; ++i) { victor = conditions[i].Check(); if (victor != Alliances.Neutral) { if (victoryEvent != null) { victoryEvent(this, EventArgs.Empty); } Debug.Log("Battle concluded with victor: " + victor.ToString()); break; } } }