bn::sprite_move_loop_action class

Modifies the position of a sprite_ptr from a minimum to a maximum. When the position is equal to the given final state, it goes back to its initial state and vice versa.

Base classes

template<typename Value, typename Property, class PropertyManager>
class loop_value_template_action<sprite_ptr, fixed_point, sprite_position_manager>
Modifies the property of a value 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.

Constructors, destructors, conversion operators

sprite_move_loop_action(const sprite_ptr& sprite, int duration_updates, fixed final_x, fixed final_y)
Constructor.
sprite_move_loop_action(sprite_ptr&& sprite, int duration_updates, fixed final_x, fixed final_y)
Constructor.
sprite_move_loop_action(const sprite_ptr& sprite, int duration_updates, const fixed_point& final_position)
Constructor.
sprite_move_loop_action(sprite_ptr&& sprite, int duration_updates, const fixed_point& final_position)
Constructor.

Public functions

auto sprite() const -> const sprite_ptr&
Returns the sprite_ptr to modify.
auto final_position() const -> const fixed_point&
When the position of the given sprite_ptr is equal to this returned parameter, it goes back to its initial state and vice versa.

Function documentation

bn::sprite_move_loop_action::sprite_move_loop_action(const sprite_ptr& sprite, int duration_updates, fixed final_x, fixed final_y)

Constructor.

Parameters
sprite sprite_ptr to copy.
duration_updates How much times the action has to be updated before changing the direction of the position delta.
final_x When the horizontal position of the given sprite_ptr is equal to this parameter, it goes back to its initial state and vice versa.
final_y When the vertical position of the given sprite_ptr is equal to this parameter, it goes back to its initial state and vice versa.

bn::sprite_move_loop_action::sprite_move_loop_action(sprite_ptr&& sprite, int duration_updates, fixed final_x, fixed final_y)

Constructor.

Parameters
sprite sprite_ptr to move.
duration_updates How much times the action has to be updated before changing the direction of the position delta.
final_x When the horizontal position of the given sprite_ptr is equal to this parameter, it goes back to its initial state and vice versa.
final_y When the vertical position of the given sprite_ptr is equal to this parameter, it goes back to its initial state and vice versa.

bn::sprite_move_loop_action::sprite_move_loop_action(const sprite_ptr& sprite, int duration_updates, const fixed_point& final_position)

Constructor.

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

bn::sprite_move_loop_action::sprite_move_loop_action(sprite_ptr&& sprite, int duration_updates, const fixed_point& final_position)

Constructor.

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