bn::isprite_animate_action class

Base class of bn::sprite_animate_action.

Can be used as a reference type for all bn::sprite_animate_action objects.

Derived classes

template<int MaxSize>
class sprite_animate_action
Changes the tile set of a sprite_ptr when the action is updated a given number of times.

Public functions

auto operator=(const isprite_animate_action& other) -> isprite_animate_action&
Copy assignment operator.
auto operator=(isprite_animate_action&& other) -> isprite_animate_action& noexcept
Move assignment operator.
void update()
Changes the tile set of the given sprite_ptr when the given amount of update calls are done.
auto done() const -> bool
Indicates if the action must not be updated anymore.
void reset()
Resets the action to its initial state.
auto sprite() const -> const sprite_ptr&
Returns the sprite_ptr to modify.
auto wait_updates() const -> int
Returns the number of times the action must be updated before changing the tiles of the given sprite_ptr.
void set_wait_updates(int wait_updates)
Sets the number of times the action must be updated before changing the tiles of the given sprite_ptr.
auto next_change_updates() const -> int
Returns the number of times the action must be updated before the next tiles change.
auto tiles_item() const -> const sprite_tiles_item&
Returns the sprite_tiles_item used to create the new sprite tiles to use by the given sprite_ptr.
auto graphics_indexes() const -> const ivector<uint16_t>&
Returns the indexes of the tile sets to reference in the given sprite_tiles_item.
auto update_forever() const -> bool
Indicates if the action can be updated forever or not.
auto current_index() const -> int
Returns the current index of the given graphics_indexes (not the current index of the tile set to reference in the given tiles_item).
auto current_graphics_index() const -> int
Returns the current index of the tile set to reference in the given tiles_item.

Function documentation

isprite_animate_action& bn::isprite_animate_action::operator=(const isprite_animate_action& other)

Copy assignment operator.

Parameters
other isprite_animate_action to copy.
Returns Reference to this.

isprite_animate_action& bn::isprite_animate_action::operator=(isprite_animate_action&& other) noexcept

Move assignment operator.

Parameters
other isprite_animate_action to move.
Returns Reference to this.