IProjectVGameplayDataPresenter interface
The mission scene's link to the current run: report skill uses and send the result. You receive it in IProjectVGameplayDataConsumer.BindGameplayData; it also implements IProjectVGameplayDataPolicy. Once unbound, every call fails.
Namespace: SilverTiger.ProjectV.Unity.Presentation.Gameplay
public interface IProjectVGameplayDataPresenter
Properties
| Property | Type | Description |
|---|---|---|
OwnsAuthoritativeRun | bool | True while this presenter belongs to a started run that was not cancelled. Check it before using the presenter. |
IsSettlementConfirmed | bool | True once the server confirmed the end of the run. Keep your local run data until then. |
Methods
RecordSkillActivated(ProjectVGameplaySkillId skillId, ProjectVGameplayDataSkillSlot slot)
Records one use of an active skill. Call it each time the player uses a skill.
ProjectVGameplayDataResult RecordSkillActivated(ProjectVGameplaySkillId skillId, ProjectVGameplayDataSkillSlot slot);
Parameters
| Name | Type | Description |
|---|---|---|
skillId | ProjectVGameplaySkillId | The skill used: the ProjectVGameplayCastSkillView.SkillId of the matching slot. |
slot | ProjectVGameplayDataSkillSlot | The slot of the skill. |
Returns
ProjectVGameplayDataResult: Success when recorded. A failure when the skill does not match the slot in ProjectVGameplayStartingDataView.CastSkills, the outcome is already reported, or the presenter no longer belongs to the run.
Exceptions
| Exception | When |
|---|---|
ArgumentOutOfRangeException | slot is not a defined slot. |
CompleteAsync(ProjectVGameplayCompletionView input, CancellationToken cancellationToken)
Sends the result of the run and waits for the server. After a success, calling again returns the same result. After a failure, call again with the same input to retry.
Task<ProjectVGameplayDataResult> CompleteAsync(ProjectVGameplayCompletionView input, CancellationToken cancellationToken);
Parameters
| Name | Type | Description |
|---|---|---|
input | ProjectVGameplayCompletionView | The result of the run. |
cancellationToken | CancellationToken | Stops waiting for the server. |
Returns
Task<ProjectVGameplayDataResult>: On success, ProjectVGameplayDataResult.Rewards, ProjectVGameplayDataResult.MailedRewards and ProjectVGameplayDataResult.Stars are what to show. On failure, keep the result screen open with Retry.
Exceptions
| Exception | When |
|---|---|
ArgumentNullException | input is null. |
ArgumentException | A value in input is out of range, such as negative health or an undefined outcome. |
CancelRunAsync(CancellationToken cancellationToken)
Ends the run without settling it, for Pause > Restart. A cancelled run costs no stamina; start the mission again with a new admission.
Task<ProjectVGameplayDataResult> CancelRunAsync(CancellationToken cancellationToken);
Parameters
| Name | Type | Description |
|---|---|---|
cancellationToken | CancellationToken | Stops waiting for the server. |
Returns
Task<ProjectVGameplayDataResult>: Success when the run was cancelled. A failure when the outcome is already reported (settle it with a completion instead) or the presenter no longer belongs to the run.