class DepletablePoints
|
Keeps track of a variable value with a maximum possible value. More... |
|
|
Public Members
Detailed Description
Keeps track of a variable value with a maximum possible value. Archetypical example is
hit points.
Creates a DepletablePoints with maximum 0
DepletablePoints (int val)
|
Creates a DepletablePoints with maximum val
DepletablePoints (int curr,int max)
|
Creates a DepletablePoints with maximum max but a current value curr
Increases the current value by delta and enforces the maximum. Returns the new current value
Changes the current value to val and enforces the maximum. Returns the new current value
Sets the maximum value to val and enforces it. Returns the new current value
int ChangeMax (int delta)
|
Increases the maximum value by delta and enforces it. Returns the new current value
Makes the current and maximum values equal to the corresponding values in the argument.
[const]Returns the current value of the object
[const]Returns the maximum value
[const]What do you think?
Increments the current value of the DepletablePoints.
Decrements the current value of the DepletablePoints.
[const]Adds the argument to the current value and returns it. Non-destructive.
[const]Subtracts the argument from the current value and returns it.
Assigns the argument to the current value.
Assigns the current value of the argument to the current value.
Increases the current value by the argument.
Decreases the current value by the argument.
- Author: Daniel Roberge
- Generated: droberge@magebook.localdomain on Mon Jul 3 13:20:08 200.