Unravel Engine C++ Reference
|
Represents an action within the sequence management system. Contains lifecycle events and management functions. More...
#include <seq_action.h>
Public Types | |
using | updater_t = std::function<state_t(duration_t, seq_action&)> |
Type alias for an updater function that defines the action's behavior. | |
using | creator_t = std::function<updater_t()> |
Type alias for a creator function that generates an updater function for the action. | |
Public Member Functions | |
seq_action ()=default | |
~seq_action ()=default | |
seq_action (creator_t &&creator, duration_t duration, sentinel_t sentinel) | |
Constructs a seq_action. | |
seq_action (const seq_action &)=default | |
seq_action (seq_action &&)=default | |
auto | operator= (const seq_action &) -> seq_action &=default |
auto | operator= (seq_action &&) -> seq_action &=default |
auto | get_id () const -> seq_id_t |
Gets the unique ID of the action. | |
operator seq_id_t () const | |
Converts the action to its unique ID. | |
auto | is_valid () const noexcept -> bool |
Checks if the action is valid. | |
Public Attributes | |
hpp::event< void()> | on_begin |
Event emitted when the action is started. | |
hpp::event< void()> | on_step |
Event emitted every time the action value is updated. | |
hpp::event< void()> | on_update |
Event emitted every frame while the action is running. | |
hpp::event< void()> | on_end |
Event emitted when the action is finished. Not emitted if the action is stopped prematurely. | |
seq_inspect_info::ptr | info |
Gets a pointer to the action's inspection information. | |
Friends | |
struct | seq_private |
Represents an action within the sequence management system. Contains lifecycle events and management functions.
Definition at line 17 of file seq_action.h.
using seq::seq_action::creator_t = std::function<updater_t()> |
Type alias for a creator function that generates an updater function for the action.
Definition at line 33 of file seq_action.h.
using seq::seq_action::updater_t = std::function<state_t(duration_t, seq_action&)> |
Type alias for an updater function that defines the action's behavior.
delta | The time delta since the last update. |
action | Reference to the current action. |
Definition at line 27 of file seq_action.h.
|
default |
|
default |
seq::seq_action::seq_action | ( | creator_t && | creator, |
duration_t | duration, | ||
sentinel_t | sentinel ) |
Constructs a seq_action.
creator | A function that creates an updater for the action. |
duration | The total duration of the action. |
sentinel | A sentinel value for internal state management. |
Definition at line 8 of file seq_action.cpp.
|
default |
|
default |
auto seq::seq_action::get_id | ( | ) | const -> seq_id_t |
Gets the unique ID of the action.
Definition at line 20 of file seq_action.cpp.
|
noexcept |
Checks if the action is valid.
Definition at line 30 of file seq_action.cpp.
seq::seq_action::operator seq_id_t | ( | ) | const |
Converts the action to its unique ID.
Definition at line 25 of file seq_action.cpp.
|
default |
|
default |
|
friend |
Definition at line 19 of file seq_action.h.
seq_inspect_info::ptr seq::seq_action::info |
Gets a pointer to the action's inspection information.
Definition at line 75 of file seq_action.h.
hpp::event<void()> seq::seq_action::on_begin |
Event emitted when the action is started.
Definition at line 55 of file seq_action.h.
hpp::event<void()> seq::seq_action::on_end |
Event emitted when the action is finished. Not emitted if the action is stopped prematurely.
Definition at line 70 of file seq_action.h.
hpp::event<void()> seq::seq_action::on_step |
Event emitted every time the action value is updated.
Definition at line 60 of file seq_action.h.
hpp::event<void()> seq::seq_action::on_update |
Event emitted every frame while the action is running.
Definition at line 65 of file seq_action.h.