ProjectVCampaignMissionStars class
The star objectives and milestones of a Campaign mission, and the player's best run on it.
Namespace: SilverTiger.ProjectV.Unity.Presentation.Campaign
public sealed class ProjectVCampaignMissionStars
Constructors​
ProjectVCampaignMissionStars(long bestStars, long? requiresTotalStars, IReadOnlyList<string> bestRunObjectiveIds, IReadOnlyList<ProjectVCampaignStarObjective> objectives, IReadOnlyList<ProjectVCampaignStarMilestone> milestones, bool isLocked)​
Creates star data, for example as test data.
public ProjectVCampaignMissionStars(long bestStars, long? requiresTotalStars, IReadOnlyList<string> bestRunObjectiveIds, IReadOnlyList<ProjectVCampaignStarObjective> objectives, IReadOnlyList<ProjectVCampaignStarMilestone> milestones, bool isLocked);
Parameters
| Name | Type | Description |
|---|---|---|
bestStars | long | The stars of the player's best run; 0 or more. |
requiresTotalStars | long? | The Campaign total stars needed to start the mission, or null when there is no such lock. |
bestRunObjectiveIds | IReadOnlyList<string> | The objectives met in the best run; not null. |
objectives | IReadOnlyList<ProjectVCampaignStarObjective> | The mission's star objectives; not null. |
milestones | IReadOnlyList<ProjectVCampaignStarMilestone> | The mission's star milestones; not null. |
isLocked | bool | True when the player has fewer Campaign stars than requiresTotalStars. |
Exceptions
| Exception | When |
|---|---|
ArgumentOutOfRangeException | bestStars is negative. |
ArgumentNullException | bestRunObjectiveIds, objectives or milestones is null. |
Properties​
| Property | Type | Description |
|---|---|---|
None (static) | ProjectVCampaignMissionStars | The value for a mission without stars: no objectives, no milestones, not locked. |
BestStars | long | The stars of the player's best run on this mission. |
MaxStars | long | The most stars a run can earn (the number of objectives); 0 when the mission has no stars. |
RequiresTotalStars | long? | The Campaign total stars needed before the mission can start; null when there is no such lock. |
BestRunObjectiveIds | IReadOnlyList<string> | The IDs of the objectives met in the best run, as in ProjectVCampaignStarObjective.ObjectiveId. |
Objectives | IReadOnlyList<ProjectVCampaignStarObjective> | The mission's star objectives; each one met earns one star. |
Milestones | IReadOnlyList<ProjectVCampaignStarMilestone> | Rewards earned once each when the best run reaches enough stars. |
IsLocked | bool | True while the player's Campaign total stars are below RequiresTotalStars; the mission cannot start. |