Example #1
0
    public void MarkLastEntryTeamAsFinished(Team inTeam)
    {
        CareerHistoryEntry lastEntryTeam = this.GetLastEntryTeam(inTeam, false);

        if (lastEntryTeam == null)
        {
            return;
        }
        lastEntryTeam.MarkEntryAsFinished(Game.instance.time.now);
    }
Example #2
0
 public CareerHistoryEntry GetLastEntryTeam(Team inTeam, bool inCheckForFinishedEntryOnly)
 {
     for (int index = this.careerCount - 1; index >= 0; --index)
     {
         CareerHistoryEntry careerHistoryEntry = this.mCareer[index];
         if (inCheckForFinishedEntryOnly)
         {
             if (careerHistoryEntry.team == inTeam && careerHistoryEntry.isFinished)
             {
                 return(careerHistoryEntry);
             }
         }
         else if (careerHistoryEntry.team == inTeam)
         {
             return(careerHistoryEntry);
         }
     }
     return((CareerHistoryEntry)null);
 }