Chuyển tới nội dung chính

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

NameTypeDescription
bestStarslongThe stars of the player's best run; 0 or more.
requiresTotalStarslong?The Campaign total stars needed to start the mission, or null when there is no such lock.
bestRunObjectiveIdsIReadOnlyList<string>The objectives met in the best run; not null.
objectivesIReadOnlyList<ProjectVCampaignStarObjective>The mission's star objectives; not null.
milestonesIReadOnlyList<ProjectVCampaignStarMilestone>The mission's star milestones; not null.
isLockedboolTrue when the player has fewer Campaign stars than requiresTotalStars.

Exceptions

ExceptionWhen
ArgumentOutOfRangeExceptionbestStars is negative.
ArgumentNullExceptionbestRunObjectiveIds, objectives or milestones is null.

Properties​

PropertyTypeDescription
None (static)ProjectVCampaignMissionStarsThe value for a mission without stars: no objectives, no milestones, not locked.
BestStarslongThe stars of the player's best run on this mission.
MaxStarslongThe most stars a run can earn (the number of objectives); 0 when the mission has no stars.
RequiresTotalStarslong?The Campaign total stars needed before the mission can start; null when there is no such lock.
BestRunObjectiveIdsIReadOnlyList<string>The IDs of the objectives met in the best run, as in ProjectVCampaignStarObjective.ObjectiveId.
ObjectivesIReadOnlyList<ProjectVCampaignStarObjective>The mission's star objectives; each one met earns one star.
MilestonesIReadOnlyList<ProjectVCampaignStarMilestone>Rewards earned once each when the best run reaches enough stars.
IsLockedboolTrue while the player's Campaign total stars are below RequiresTotalStars; the mission cannot start.