private void UpdateMissions() { missions.ForEach(m => m.Remove()); missions.Clear(); expeditions.ForEach(e => e.Remove()); expeditions.Clear(); foreach (var mission in missionService.Missions) { var missionOverlay = Instantiate(missionPrefab, canvas); missionOverlay.SetMission(mission); missions.Add(missionOverlay); } foreach (var expedition in expeditionService.PlayerExpeditions()) { var expeditionOverlay = Instantiate(expeditionPrefab, canvas); expeditionOverlay.SetExpedition(expedition); expeditions.Add(expeditionOverlay); } }
private bool HasFinishedMissionOrExpedition() { return(missionService.Missions.Exists(m => m.missionFinished) || expeditionService.PlayerExpeditions().Exists(e => e.DoneTime <= DateTime.Now)); }