Beispiel #1
0
 private void OnEmpireLeaderChange(Empire empire, Leader leader)
 {
     if (leader.ControlledBy() == this)
     {
         if (!empires.Contains(empire))
         {
             AddEmpire(empire);
         }
     }
     else
     {
         if (empires.Contains(empire))
         {
             RemoveEmpire(empire);
         }
     }
     UpdateStats();
 }
Beispiel #2
0
    private void OnLeaderLoyaltyChange(Leader leader)
    {
        if (leadersControlled.Contains(leader))
        {
            leadersControlled.Remove(leader);
            if (empires.Contains(leader.GetEmpire()))
            {
                RemoveEmpire(leader.GetEmpire());
            }
        }

        if (leader.ControlledBy() == this)
        {
            leadersControlled.Add(leader);
            if (!empires.Contains(leader.GetEmpire()))
            {
                AddEmpire(leader.GetEmpire());
            }
        }
        UpdateStats();
    }