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

Modifies the property by delta when the action is updated a given number of times.

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

Constructors, destructors, conversion operators

duration_by_template_action(int duration_updates, const Property& delta_property) protected
Constructor.

Public functions

void reset()
Resets the property to its initial state.
void update()
Adds delta_property to the property when the given amount of update calls are done.
auto duration_updates() const -> int
Returns how many times the action has to be updated before updating the property.

Protected functions

auto delta_property() const -> const Property&
Returns how much to add to the property when the action is updated the given number of times.

Function documentation

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

Constructor.

Parameters
duration_updates How many times the action has to be updated before updating the property.
delta_property How much to add to the property when the action is updated duration_updates times.