#include <bn_sprite_animate_actions.h>
template<int MaxSize>
sprite_animate_action class
Changes the tile set of a sprite_
Template parameters | |
---|---|
MaxSize | Maximum number of indexes to sprite tile sets to store. |
Each time the tile set of a sprite_
Base classes
- class isprite_animate_action
- Base class of bn::
sprite_animate_action.
Public static functions
-
static auto once(const sprite_
ptr& sprite, int wait_updates, const sprite_ tiles_ item& tiles_item, const span<const uint16_t>& graphics_indexes) -> sprite_ animate_ action - Generates a sprite_
animate_ action which loops over the given sprite tile sets only once. -
static auto once(sprite_
ptr&& sprite, int wait_updates, const sprite_ tiles_ item& tiles_item, const span<const uint16_t>& graphics_indexes) -> sprite_ animate_ action - Generates a sprite_
animate_ action which loops over the given sprite tile sets only once. -
static auto forever(const sprite_
ptr& sprite, int wait_updates, const sprite_ tiles_ item& tiles_item, const span<const uint16_t>& graphics_indexes) -> sprite_ animate_ action - Generates a sprite_
animate_ action which loops over the given sprite tile sets forever. -
static auto forever(sprite_
ptr&& sprite, int wait_updates, const sprite_ tiles_ item& tiles_item, const span<const uint16_t>& graphics_indexes) -> sprite_ animate_ action - Generates a sprite_
animate_ action which loops over the given sprite tile sets forever.
Constructors, destructors, conversion operators
-
sprite_animate_action(const sprite_
animate_ action& other) - Copy constructor.
-
sprite_animate_action(sprite_
animate_ action&& other) noexcept - Move constructor.
-
sprite_animate_action(const isprite_
animate_ action& other) - Copy constructor.
Public functions
-
auto operator=(const sprite_
animate_ action& other) -> sprite_ animate_ action& - Copy assignment operator.
-
auto operator=(sprite_
animate_ action&& other) -> sprite_ animate_ action& noexcept - Move assignment operator.
-
auto operator=(const isprite_
animate_ action& other) -> sprite_ animate_ action& - Copy assignment operator.
-
auto operator=(isprite_
animate_ action&& other) -> sprite_ animate_ action& noexcept - Move assignment operator.
Function documentation
template<int MaxSize>
static sprite_ animate_ action bn:: sprite_animate_action<MaxSize>:: once(const sprite_ ptr& sprite,
int wait_updates,
const sprite_ tiles_ item& tiles_item,
const span<const uint16_t>& graphics_indexes)
Generates a sprite_
Parameters | |
---|---|
sprite | sprite_ |
wait_updates | Number of times the action must be updated before changing the tiles of the given sprite_ |
tiles_item | It creates the new sprite tiles to use by the given sprite_ |
graphics_indexes | Indexes of the tile sets to reference in tiles_item. |
Returns | The requested sprite_ |
template<int MaxSize>
static sprite_ animate_ action bn:: sprite_animate_action<MaxSize>:: once(sprite_ ptr&& sprite,
int wait_updates,
const sprite_ tiles_ item& tiles_item,
const span<const uint16_t>& graphics_indexes)
Generates a sprite_
Parameters | |
---|---|
sprite | sprite_ |
wait_updates | Number of times the action must be updated before changing the tiles of the given sprite_ |
tiles_item | It creates the new sprite tiles to use by the given sprite_ |
graphics_indexes | Indexes of the tile sets to reference in the given sprite_ |
Returns | The requested sprite_ |
template<int MaxSize>
static sprite_ animate_ action bn:: sprite_animate_action<MaxSize>:: forever(const sprite_ ptr& sprite,
int wait_updates,
const sprite_ tiles_ item& tiles_item,
const span<const uint16_t>& graphics_indexes)
Generates a sprite_
Parameters | |
---|---|
sprite | sprite_ |
wait_updates | Number of times the action must be updated before changing the tiles of the given sprite_ |
tiles_item | It creates the new sprite tiles to use by the given sprite_ |
graphics_indexes | Indexes of the tile sets to reference in the given sprite_ |
Returns | The requested sprite_ |
template<int MaxSize>
static sprite_ animate_ action bn:: sprite_animate_action<MaxSize>:: forever(sprite_ ptr&& sprite,
int wait_updates,
const sprite_ tiles_ item& tiles_item,
const span<const uint16_t>& graphics_indexes)
Generates a sprite_
Parameters | |
---|---|
sprite | sprite_ |
wait_updates | Number of times the action must be updated before changing the tiles of the given sprite_ |
tiles_item | It creates the new sprite tiles to use by the given sprite_ |
graphics_indexes | Indexes of the tile sets to reference in the given sprite_ |
Returns | The requested sprite_ |
template<int MaxSize>
bn:: sprite_animate_action<MaxSize>:: sprite_animate_action(const sprite_ animate_ action& other)
Copy constructor.
Parameters | |
---|---|
other | sprite_ |
template<int MaxSize>
bn:: sprite_animate_action<MaxSize>:: sprite_animate_action(sprite_ animate_ action&& other) noexcept
Move constructor.
Parameters | |
---|---|
other | sprite_ |
template<int MaxSize>
bn:: sprite_animate_action<MaxSize>:: sprite_animate_action(const isprite_ animate_ action& other)
Copy constructor.
Parameters | |
---|---|
other | isprite_ |
template<int MaxSize>
sprite_ animate_ action& bn:: sprite_animate_action<MaxSize>:: operator=(const sprite_ animate_ action& other)
Copy assignment operator.
Parameters | |
---|---|
other | sprite_ |
Returns | Reference to this. |
template<int MaxSize>
sprite_ animate_ action& bn:: sprite_animate_action<MaxSize>:: operator=(sprite_ animate_ action&& other) noexcept
Move assignment operator.
Parameters | |
---|---|
other | sprite_ |
Returns | Reference to this. |
template<int MaxSize>
sprite_ animate_ action& bn:: sprite_animate_action<MaxSize>:: operator=(const isprite_ animate_ action& other)
Copy assignment operator.
Parameters | |
---|---|
other | isprite_ |
Returns | Reference to this. |
template<int MaxSize>
sprite_ animate_ action& bn:: sprite_animate_action<MaxSize>:: operator=(isprite_ animate_ action&& other) noexcept
Move assignment operator.
Parameters | |
---|---|
other | ivector to move. |
Returns | Reference to this. |