Numeric Value
Scripting with the NumericValue struct.
The NumericValue
struct is used by the Scaling Value class to support multiple numeric types.
Fields & Properties
Name
Description
Type
Access
numericType
The numeric type.
NumericType
public
value
The value.
NumericValue.Value
public
NumericType
Name
Description
Float
Float value type.
Integer
Integer value type.
Creating a Numeric Value
// A numeric value with the value of 10 (use 10f if the numeric type should be Float)
NumericValue myNumericValue = 10;
Operators
You can use arithmetic and comparison operators for mathematical and comparison purposes.
Arithmetic Example
You can use arithmetic operators for a NumericValue
for mathematical purposes with another NumericValue
, int
, or float
value.
NumericValue valueC = valueA + valueB;
Comparison Example
You can use comparison operators for to compare a StatValue
with another StatValue
, int
, or float
value.
if (statValueA >= statValueB)
{
// Do something...
}
Last updated