예제 #1
0
 void PassOnWarsToOtherLord(List <Relationship> warsOfPreviousLord, Lord newLord)
 {
     if (warsOfPreviousLord.Count <= 0)
     {
         return;
     }
     for (int i = 0; i < newLord.relationshipLords.Count; i++)
     {
         for (int j = 0; j < warsOfPreviousLord.Count; j++)
         {
             if (newLord.relationshipLords[i].lord.id == warsOfPreviousLord[j].lord.id)
             {
                 newLord.GoToWarWith(newLord.relationshipLords [i].lord);
                 newLord.relationshipLords [i].lord.GoToWarWith(newLord);
             }
         }
     }
     Debug.LogError("Passed on wars to: " + newLord.id.ToString() + " - " + newLord.name);
 }