Fade a sprite by a relative alpha value.
More...
#include <FadeAlphaByAction.hpp>
|
| | FadeAlphaByAction (const std::shared_ptr< Sprite > &drawable, real32 delta, real32 seconds) |
| | Fade a sprite by a relative alpha value.
|
| 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.
|
|
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.
|
| virtual void | set_speed (real32 speed) |
| | Set the speed factor of the action.
|
| virtual void | set_timing_curve (const IActionObject::timing_curve_func &mode) |
| | Set the timing mode of the action.
|
|
|
IActionObject::FrameState | update (real32 t, real32 b, real32 c, real32 d) |
|
void | first_frame (real32 delta_time) |
|
void | last_frame (real32 delta_time) |
|
| class | ActionTest |
| | Allow access into our private parts for unit testing.
|
|
| 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.
|
| real32 | elapsed_frames_ = 0.0f |
| | Internal frames counter.
|
| Timer | timer_ |
| | Internal time clock (milliseconds resolution).
|
| 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.
|
Fade a sprite by a relative alpha value.
...
FadeAlphaByAction(const std::shared_ptr< Sprite > &drawable, real32 delta, real32 seconds)
Fade a sprite by a relative alpha value.
Definition at line 43 of file FadeAlphaByAction.hpp.
◆ derived_type
| typedef IActionObject nom::FadeAlphaByAction::derived_type |
◆ self_type
◆ FadeAlphaByAction()
| nom::FadeAlphaByAction::FadeAlphaByAction |
( |
const std::shared_ptr< Sprite > & | drawable, |
|
|
real32 | delta, |
|
|
real32 | seconds ) |
Fade a sprite by a relative alpha value.
- Parameters
-
| drawable | A valid nom::Sprite instance. |
| delta | The total change in alpha to apply to the drawable over time. |
| seconds | The duration of the animation. |
◆ clone()
| virtual std::unique_ptr< IActionObject > nom::FadeAlphaByAction::clone |
( |
| ) |
const |
|
overridevirtual |
◆ next_frame()
Play the action forward in time by one time step.
- Parameters
-
| delta_time | Reserved for application-defined implementations. |
- Note
- This method should not normally need to be called externally! Exceptions might include: a) implementing a new action; b) advanced debugging
- See also
- nom::DispatchQueue
Implements nom::IActionObject.
◆ pause()
| virtual void nom::FadeAlphaByAction::pause |
( |
real32 | delta_time | ) |
|
|
overridevirtual |
Freeze the action's internal state.
- Parameters
-
| delta_time | Reserved for application-defined implementations. |
- Note
- This method should not normally need to be called externally! Exceptions might include: a) implementing a new action; b) advanced debugging
- See also
- nom::DispatchQueue
Implements nom::IActionObject.
◆ prev_frame()
Play the action backwards in time by one time step.
- Parameters
-
| delta_time | Reserved for application-defined implementations. |
- Note
- This method should not normally need to be called externally! Exceptions might include: a) implementing a new action; b) advanced debugging
- See also
- nom::ReversedAction
Implements nom::IActionObject.
◆ release()
| virtual void nom::FadeAlphaByAction::release |
( |
| ) |
|
|
overridevirtual |
Free externally referenced resources held by the action.
- Note
- This method should not normally need to be called externally! Exceptions might include: a) implementing a new action; b) advanced debugging
- See also
- nom::RemoveAction
Implements nom::IActionObject.
◆ resume()
| virtual void nom::FadeAlphaByAction::resume |
( |
real32 | delta_time | ) |
|
|
overridevirtual |
Resume the internal state of the action.
- Parameters
-
| delta_time | Reserved for application-defined implementations. |
- Note
- This method should not normally need to be called externally! Exceptions might include: a) implementing a new action; b) advanced debugging
- See also
- nom::DispatchQueue
Implements nom::IActionObject.
◆ rewind()
| virtual void nom::FadeAlphaByAction::rewind |
( |
real32 | delta_time | ) |
|
|
overridevirtual |
Reset the internal state of the action back to its initial starting values.
- Parameters
-
| delta_time | Reserved for application-defined implementations. |
- Note
- This method should not normally need to be called externally! Exceptions might include: a) implementing a new action; b) advanced debugging
- See also
- nom::RepeatForAction, nom::RepeatForeverAction
Implements nom::IActionObject.
◆ ActionTest
◆ alpha_
| uint8 nom::FadeAlphaByAction::alpha_ = 0 |
|
private |
◆ DEBUG_CLASS_NAME
| const char* nom::FadeAlphaByAction::DEBUG_CLASS_NAME |
|
staticprivate |
◆ drawable_
| std::shared_ptr<Sprite> nom::FadeAlphaByAction::drawable_ |
|
private |
◆ initial_alpha_
| real32 nom::FadeAlphaByAction::initial_alpha_ = 0.0f |
|
private |
◆ total_displacement_
| const real32 nom::FadeAlphaByAction::total_displacement_ = 0.0f |
|
private |
The documentation for this class was generated from the following file: