예제 #1
0
    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()}");
        }
    }
예제 #2
0
 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;
         }
     }
 }
예제 #3
0
 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;
         }
     }
 }