Use an IntValueAccumulator to increase the value of an integer property type over time or per frame.
To use an IntValueAccumulator, set:
- The property type on the node whose value you want to increment. You set this in the
TargetPropertyTypeProperty.
- The size of the increment:
- To set increments of fixed size, set the IncrementSizeProperty.
- To define the size of increments with a property, set the IncrementSizeSourceProperty.
For example, this way you can change the size of increments during application runtime.
- How the Value Accumulator increments the accumulated value. You set this in the IncrementModeProperty:
- IncrementMode::TimeBased (default) increments based on time intervals. Set the frequency
of increments in milliseconds in the IncrementTimeIntervalProperty.
- IncrementMode::PerFrame increments once per frame, ignoring the time delta. Use this mode
for frame counters.
- The range for the total sum of the increments:
- Set the lowest value with the MinimumAccumulatedValueProperty.
- Set the highest value with the MaximumAccumulatedValueProperty.
Keep in mind that the final value of the target property is the base value of the property
plus the total sum of the increments added by a Value Accumulator.
- How you want the Value Accumulator to handle the increments when it reaches the limits of the range of increments.
You set this in the BoundTypeProperty. When the value of the target property reaches the limits of the range:
- BoundType::Clamp clamps the value
- BoundType::Loop wraps the value
Increments the value of an int property over time.
Inherits properties and message types from IntValueAccumulatorMetadata.
Synopsis
Methods
| create() |
Creates an IntValueAccumulator
|
-
IntValueAccumulator.IntValueAccumulator:create(name)
¶
-
Creates an IntValueAccumulator.
Parameters
| name |
(string) |
Name of the node component.
|
Return Values