![]() |
nomlib
|
Run a collection of actions sequentially. More...
#include <SequenceAction.hpp>
Public Types | |
| typedef SequenceAction | self_type |
| typedef IActionObject | derived_type |
| Public Types inherited from nom::IActionObject | |
| enum | FrameState { COMPLETED , PLAYING } |
| The update status of the action. More... | |
| typedef IActionObject | self_type |
| typedef std::function< real32(real32, real32, real32, real32)> | timing_curve_func |
| A function pointer to a timing mode. | |
Public Member Functions | |
| SequenceAction (const action_list &actions) | |
| Run a collection of actions sequentially. | |
| virtual std::unique_ptr< IActionObject > | clone () const override |
| Create a deep copy instance of the action. | |
| virtual IActionObject::FrameState | next_frame (real32 delta_time) override |
| Play the action forward in time by one time step. | |
| virtual IActionObject::FrameState | prev_frame (real32 delta_time) override |
| Play the action backwards in time by one time step. | |
| virtual void | pause (real32 delta_time) override |
| Freeze the action's internal state. | |
| virtual void | resume (real32 delta_time) override |
| Resume the internal state of the action. | |
| virtual void | rewind (real32 delta_time) override |
| Reset the internal state of the action back to its initial starting values. | |
| virtual void | release () override |
| Free externally referenced resources held by the action. | |
| virtual void | set_speed (real32 speed) override |
| Set the speed factor of the child actions. | |
| virtual void | set_timing_curve (const IActionObject::timing_curve_func &mode) override |
| Set the timing mode of the child actions. | |
| Public Member Functions inherited from nom::IActionObject | |
| const std::string & | name () const |
| Get the unique identifier of the action. | |
| real32 | duration () const |
| Get the duration of the action. | |
| real32 | speed () const |
| Get the speed modifier of the action. | |
| const IActionObject::timing_curve_func & | timing_curve () const |
| Get the timing mode function used by the action. | |
| void | set_name (const std::string &action_id) |
| Set the unique identifier of the action. | |
Private Types | |
| typedef std::vector< std::shared_ptr< IActionObject > > | container_type |
| typedef container_type::iterator | container_iterator |
Private Member Functions | |
| IActionObject::FrameState | update (real32 delta_time, uint32 direction) |
| const container_type & | actions () const |
Private Attributes | |
| container_type | actions_ |
| The child actions. | |
| container_iterator | actions_iterator_ |
| nom::size_type | num_completed_ |
| The total number of completed actions. | |
| nom::size_type | num_actions_ |
| The total number of actions at the time of construction. | |
Static Private Attributes | |
| static const char * | DEBUG_CLASS_NAME |
Friends | |
| class | ActionTest |
| Allow access into our private parts for unit testing. | |
Additional Inherited Members | |
| Protected Member Functions inherited from nom::IActionObject | |
| IActionObject::FrameState | status () const |
| Get the current state of the action. | |
| void | set_duration (real32 seconds) |
| Set the duration of the action. | |
| void | set_status (FrameState state) |
| Set the state of the action. | |
| Protected Attributes inherited from nom::IActionObject | |
| real32 | elapsed_frames_ = 0.0f |
| Internal frames counter. | |
| Timer | timer_ |
| Internal time clock (milliseconds resolution). | |
| Related Symbols inherited from nom::IActionObject | |
| typedef std::vector< std::shared_ptr< IActionObject > > | action_list |
| A collection of actions. | |
| template<typename ObjectType, typename... ObjectArgs> | |
| std::shared_ptr< ObjectType > | create_action (ObjectArgs &&... args) |
| Constructor function for creating an action. | |
| template<typename ObjectType> | |
| std::shared_ptr< ObjectType > | create_action (const action_list &actions) |
| Constructor function for creating an action that uses a collection of actions. | |
Run a collection of actions sequentially.
This action acts on behalf of other actions as a proxy, running actions to completion, one at a time, before iterating to the next action, in FIFO order. The total duration of the sequence action is the sum of every action's durations in the sequence.
Definition at line 41 of file SequenceAction.hpp.
|
private |
Definition at line 92 of file SequenceAction.hpp.
|
private |
Definition at line 91 of file SequenceAction.hpp.
| typedef IActionObject nom::SequenceAction::derived_type |
Definition at line 48 of file SequenceAction.hpp.
| typedef SequenceAction nom::SequenceAction::self_type |
Definition at line 47 of file SequenceAction.hpp.
| nom::SequenceAction::SequenceAction | ( | const action_list & | actions | ) |
Run a collection of actions sequentially.
| actions | The group of actions to execute; NULL actions are valid. |
|
overridevirtual |
Create a deep copy instance of the action.
Implements nom::IActionObject.
|
overridevirtual |
Play the action forward in time by one time step.
| delta_time | Reserved for application-defined implementations. |
Implements nom::IActionObject.
|
overridevirtual |
Freeze the action's internal state.
| delta_time | Reserved for application-defined implementations. |
Implements nom::IActionObject.
|
overridevirtual |
Play the action backwards in time by one time step.
| delta_time | Reserved for application-defined implementations. |
Implements nom::IActionObject.
|
overridevirtual |
Free externally referenced resources held by the action.
Implements nom::IActionObject.
|
overridevirtual |
Resume the internal state of the action.
| delta_time | Reserved for application-defined implementations. |
Implements nom::IActionObject.
|
overridevirtual |
Reset the internal state of the action back to its initial starting values.
| delta_time | Reserved for application-defined implementations. |
Implements nom::IActionObject.
|
overridevirtual |
Set the speed factor of the child actions.
Reimplemented from nom::IActionObject.
|
overridevirtual |
Set the timing mode of the child actions.
Reimplemented from nom::IActionObject.
|
friend |
Allow access into our private parts for unit testing.
Definition at line 45 of file SequenceAction.hpp.
|
private |
The child actions.
Definition at line 97 of file SequenceAction.hpp.
|
private |
Definition at line 98 of file SequenceAction.hpp.
|
staticprivate |
Definition at line 86 of file SequenceAction.hpp.
|
private |
The total number of actions at the time of construction.
Definition at line 104 of file SequenceAction.hpp.
|
private |
The total number of completed actions.
Definition at line 101 of file SequenceAction.hpp.