예제 #1
0
    public static void RotateMissions()
    {
        foreach (var mission in CampaignMapState.MissionsActive)
        {
            mission.DaysUntilExpiration--;
            if (mission.DaysUntilExpiration == 0)
            {
                mission.OnFailed();
            }
        }

        //now remove them from the active missions list.
        CampaignMapState.MissionsActive.RemoveAll(item => item.DaysUntilExpiration <= 0);

        if (CampaignMapState.MissionsActive.IsEmpty())
        {
            var newMissions = MissionGenerator.GenerateAllMissionsForRegion();
            CampaignMapState.MissionsActive.AddRange(newMissions);
        }
    }
예제 #2
0
 public static void InitializeSelectableMissions()
 {
     CampaignMapState.MissionsActive = MissionGenerator.GenerateAllMissionsForRegion();
 }