bn::sprite_palette_rotate_to_action class

Modifies the number of colors to rotate to the right in a sprite_palette_ptr until it has a given state.

Base classes

template<typename Value, typename Property, class PropertyManager>
class to_value_template_action<sprite_palette_ptr, int, sprite_palette_rotate_manager>
Modifies the property of a value until it has a given state.

Constructors, destructors, conversion operators

sprite_palette_rotate_to_action(const sprite_palette_ptr& palette, int duration_updates, int final_count)
Constructor.
sprite_palette_rotate_to_action(sprite_palette_ptr&& palette, int duration_updates, int final_count)
Constructor.

Public functions

auto palette() const -> const sprite_palette_ptr&
Returns the sprite_palette_ptr to modify.
auto final_count() const -> int
Returns the number of colors to rotate to the right when the action is updated the given number of times.

Function documentation

bn::sprite_palette_rotate_to_action::sprite_palette_rotate_to_action(const sprite_palette_ptr& palette, int duration_updates, int final_count)

Constructor.

Parameters
palette sprite_palette_ptr to copy.
duration_updates Number of times that the action must be updated until the number of colors to rotate to the right is equal to final_count.
final_count Number of colors to rotate to the right when the action is updated duration_updates times.

This count must be in the range [1 - rotate_range_size() .. rotate_range_size() - 1].

bn::sprite_palette_rotate_to_action::sprite_palette_rotate_to_action(sprite_palette_ptr&& palette, int duration_updates, int final_count)

Constructor.

Parameters
palette sprite_palette_ptr to move.
duration_updates Number of times that the action must be updated until the number of colors to rotate to the right is equal to final_count.
final_count Number of colors to rotate to the right when the action is updated duration_updates times.

This count must be in the range [1 - rotate_range_size() .. rotate_range_size() - 1].