Exemplo n.º 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()}");
        }
    }
Exemplo n.º 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;
         }
     }
 }
Exemplo n.º 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;
         }
     }
 }