hx3d  1
2D/3D Simple Game Framework
Public Member Functions | List of all members
hx3d::tweens::Sequence Class Reference

Sequential suite of tweens. More...

#include <sequence.hpp>

Public Member Functions

 Sequence (bool infinite=false)
 
template<class T >
void addTween (T &mod, const T to, const float duration, const math::Interpolation interp)
 Create a tween. More...
 
void addDelay (const float delay)
 Create a delay tween. More...
 
void addCallback (std::function< void()> func)
 Create a callback tween. More...
 
void add (const Ptr< BaseTween > &tween)
 Add an existing tween. More...
 
virtual void reset () override
 Reset the tween.
 
virtual void update (const float delta) override
 Update the tween. More...
 
- Public Member Functions inherited from hx3d::tweens::BaseTween
bool hasEnded ()
 Test if the tween has ended. More...
 

Additional Inherited Members

- Protected Attributes inherited from hx3d::tweens::BaseTween
bool _ended
 Has the tween ended ?
 
bool _infinite
 Is the tween infinite ?
 

Detailed Description

Sequential suite of tweens.

Definition at line 41 of file sequence.hpp.

Constructor & Destructor Documentation

hx3d::tweens::Sequence::Sequence ( bool  infinite = false)

Create a sequence.

Parameters
infiniteInfinite ? (default: false)

Definition at line 26 of file sequence.cpp.

Member Function Documentation

void hx3d::tweens::Sequence::add ( const Ptr< BaseTween > &  tween)

Add an existing tween.

Parameters
tweenBase Tween (Ptr)

Definition at line 38 of file sequence.cpp.

void hx3d::tweens::Sequence::addCallback ( std::function< void()>  func)

Create a callback tween.

Parameters
funcFunction

Definition at line 33 of file sequence.cpp.

void hx3d::tweens::Sequence::addDelay ( const float  delay)

Create a delay tween.

Parameters
delayDelay as seconds

Definition at line 28 of file sequence.cpp.

template<class T >
void hx3d::tweens::Sequence::addTween ( T &  mod,
const T  to,
const float  duration,
const math::Interpolation  interp 
)

Create a tween.

Parameters
modBase value to edit
toEnd value
durationDuration
interpInterpolation function

Definition at line 25 of file sequence.inl.hpp.

void hx3d::tweens::Sequence::update ( const float  delta)
overridevirtual

Update the tween.

Parameters
deltaDelta time

Implements hx3d::tweens::BaseTween.

Definition at line 53 of file sequence.cpp.


The documentation for this class was generated from the following files: