template<typename Property, class PropertyManager>
bn::loop_template_action class

Modifies the property by delta from a minimum to a maximum. When the property is equal to the given final state, it goes back to its initial state and vice versa.

Template parameters
Property Property to modify.
PropertyManager Reads and writes the property to modify.

Constructors, destructors, conversion operators

loop_template_action(int duration_updates, const Property& final_property) protected
Constructor.

Public functions

void reset()
Resets the property to its initial state.
void update()
Adds or subtracts ((final_property - initial_property) / duration_updates) to the property.
auto duration_updates() const -> int
Returns how much times the action has to be updated before changing the direction of the property delta.

Protected functions

auto final_property() const -> const Property&
When the property is equal to the returned parameter, it goes back to its initial state and vice versa.

Function documentation

template<typename Property, class PropertyManager>
bn::loop_template_action<Property, PropertyManager>::loop_template_action(int duration_updates, const Property& final_property) protected

Constructor.

Parameters
duration_updates How much times the action has to be updated before changing the direction of the property delta.
final_property When the property is equal to this parameter, it goes back to its initial state and vice versa.

template<typename Property, class PropertyManager>
void bn::loop_template_action<Property, PropertyManager>::update()

Adds or subtracts ((final_property - initial_property) / duration_updates) to the property.

When the property is equal to final_property, it goes back to its initial state and vice versa.