#include <bn_sprite_animate_actions.h>
template<int MaxSize>
sprite_cached_animate_action class
Changes the tile set of a sprite_
Template parameters | |
---|---|
MaxSize | Maximum number of sprite tile sets to store. |
This action differs from sprite_
Base classes
- class isprite_cached_animate_action
- Base class of bn::
sprite_cached_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_ cached_ animate_ action - Generates a sprite_
cached_ 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_ cached_ animate_ action - Generates a sprite_
cached_ animate_ action which loops over the given sprite tile sets only once. -
static auto once(const sprite_
ptr& sprite, int wait_updates, span<sprite_ tiles_ ptr> tiles_list) -> sprite_ cached_ animate_ action - Generates a sprite_
cached_ animate_ action which loops over the given sprite tile sets only once. -
static auto once(sprite_
ptr&& sprite, int wait_updates, span<sprite_ tiles_ ptr> tiles_list) -> sprite_ cached_ animate_ action - Generates a sprite_
cached_ 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_ cached_ animate_ action - Generates a sprite_
cached_ 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_ cached_ animate_ action - Generates a sprite_
cached_ animate_ action which loops over the given sprite tile sets forever. -
static auto forever(const sprite_
ptr& sprite, int wait_updates, span<sprite_ tiles_ ptr> tiles_list) -> sprite_ cached_ animate_ action - Generates a sprite_
cached_ animate_ action which loops over the given sprite tile sets forever. -
static auto forever(sprite_
ptr&& sprite, int wait_updates, span<sprite_ tiles_ ptr> tiles_list) -> sprite_ cached_ animate_ action - Generates a sprite_
cached_ animate_ action which loops over the given sprite tile sets forever.
Constructors, destructors, conversion operators
-
sprite_cached_animate_action(const sprite_
cached_ animate_ action& other) - Copy constructor.
-
sprite_cached_animate_action(sprite_
cached_ animate_ action&& other) noexcept - Move constructor.
-
sprite_cached_animate_action(const isprite_
cached_ animate_ action& other) - Copy constructor.
Public functions
-
auto operator=(const sprite_
cached_ animate_ action& other) -> sprite_ cached_ animate_ action& - Copy assignment operator.
-
auto operator=(sprite_
cached_ animate_ action&& other) -> sprite_ cached_ animate_ action& noexcept - Move assignment operator.
-
auto operator=(const isprite_
cached_ animate_ action& other) -> sprite_ cached_ animate_ action& - Copy assignment operator.
-
auto operator=(isprite_
cached_ animate_ action&& other) -> sprite_ cached_ animate_ action& noexcept - Move assignment operator.
Function documentation
template<int MaxSize>
static sprite_ cached_ animate_ action bn:: sprite_cached_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_ cached_ animate_ action bn:: sprite_cached_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_ cached_ animate_ action bn:: sprite_cached_animate_action<MaxSize>:: once(const sprite_ ptr& sprite,
int wait_updates,
span<sprite_ tiles_ ptr> tiles_list)
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_list | List of tile sets to use by the given sprite_ |
Returns | The requested sprite_ |
template<int MaxSize>
static sprite_ cached_ animate_ action bn:: sprite_cached_animate_action<MaxSize>:: once(sprite_ ptr&& sprite,
int wait_updates,
span<sprite_ tiles_ ptr> tiles_list)
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_list | List of tile sets to use by the given sprite_ |
Returns | The requested sprite_ |
template<int MaxSize>
static sprite_ cached_ animate_ action bn:: sprite_cached_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 tiles_item. |
Returns | The requested sprite_ |
template<int MaxSize>
static sprite_ cached_ animate_ action bn:: sprite_cached_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>
static sprite_ cached_ animate_ action bn:: sprite_cached_animate_action<MaxSize>:: forever(const sprite_ ptr& sprite,
int wait_updates,
span<sprite_ tiles_ ptr> tiles_list)
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_list | List of tile sets to use by the given sprite_ |
Returns | The requested sprite_ |
template<int MaxSize>
static sprite_ cached_ animate_ action bn:: sprite_cached_animate_action<MaxSize>:: forever(sprite_ ptr&& sprite,
int wait_updates,
span<sprite_ tiles_ ptr> tiles_list)
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_list | List of tile sets to use by the given sprite_ |
Returns | The requested sprite_ |
template<int MaxSize>
bn:: sprite_cached_animate_action<MaxSize>:: sprite_cached_animate_action(const sprite_ cached_ animate_ action& other)
Copy constructor.
Parameters | |
---|---|
other | sprite_ |
template<int MaxSize>
bn:: sprite_cached_animate_action<MaxSize>:: sprite_cached_animate_action(sprite_ cached_ animate_ action&& other) noexcept
Move constructor.
Parameters | |
---|---|
other | sprite_ |
template<int MaxSize>
bn:: sprite_cached_animate_action<MaxSize>:: sprite_cached_animate_action(const isprite_ cached_ animate_ action& other)
Copy constructor.
Parameters | |
---|---|
other | isprite_ |
template<int MaxSize>
sprite_ cached_ animate_ action& bn:: sprite_cached_animate_action<MaxSize>:: operator=(const sprite_ cached_ animate_ action& other)
Copy assignment operator.
Parameters | |
---|---|
other | sprite_ |
Returns | Reference to this. |
template<int MaxSize>
sprite_ cached_ animate_ action& bn:: sprite_cached_animate_action<MaxSize>:: operator=(sprite_ cached_ animate_ action&& other) noexcept
Move assignment operator.
Parameters | |
---|---|
other | sprite_ |
Returns | Reference to this. |
template<int MaxSize>
sprite_ cached_ animate_ action& bn:: sprite_cached_animate_action<MaxSize>:: operator=(const isprite_ cached_ animate_ action& other)
Copy assignment operator.
Parameters | |
---|---|
other | isprite_ |
Returns | Reference to this. |
template<int MaxSize>
sprite_ cached_ animate_ action& bn:: sprite_cached_animate_action<MaxSize>:: operator=(isprite_ cached_ animate_ action&& other) noexcept
Move assignment operator.
Parameters | |
---|---|
other | ivector to move. |
Returns | Reference to this. |