Skip to main content

ProjectVBalancePreview class

One line of a confirmation dialog: a resource the player has, what the action costs, and what is left.

Namespace: SilverTiger.ProjectV.Unity.Presentation.Recovery

public sealed class ProjectVBalancePreview

Constructors​

ProjectVBalancePreview(ProjectVResourceId resourceId, long currentBalance, long cost)​

Creates a balance line.

public ProjectVBalancePreview(ProjectVResourceId resourceId, long currentBalance, long cost);

Parameters

NameTypeDescription
resourceIdProjectVResourceIdThe resource that is spent.
currentBalancelongHow much of it the player has now; zero or more.
costlongHow much the action costs; zero or more.

Exceptions

ExceptionWhen
ArgumentOutOfRangeExceptioncurrentBalance or cost is negative.

Properties​

PropertyTypeDescription
ResourceIdProjectVResourceIdThe resource that is spent.
CurrentBalancelongHow much of the resource the player has now.
CostlongHow much the action costs.
ProjectedBalancelongWhat the player would have left after paying; negative when they cannot afford it.
IsAffordableboolTrue when the player has enough of this resource.