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
| Name | Type | Description |
|---|---|---|
resourceId | ProjectVResourceId | The resource that is spent. |
currentBalance | long | How much of it the player has now; zero or more. |
cost | long | How much the action costs; zero or more. |
Exceptions
| Exception | When |
|---|---|
ArgumentOutOfRangeException | currentBalance or cost is negative. |
Properties
| Property | Type | Description |
|---|---|---|
ResourceId | ProjectVResourceId | The resource that is spent. |
CurrentBalance | long | How much of the resource the player has now. |
Cost | long | How much the action costs. |
ProjectedBalance | long | What the player would have left after paying; negative when they cannot afford it. |
IsAffordable | bool | True when the player has enough of this resource. |