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

Parallel suite of tweens. More...

#include <parallel.hpp>

Public Member Functions

 Parallel (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 addRepeatingCallback (std::function< void()> func, const float duration)
 Create a repeating callback. 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

Parallel suite of tweens.

Definition at line 38 of file parallel.hpp.

Constructor & Destructor Documentation

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

Create a parallel tween.

Parameters
infiniteInfinite ? (default: false)

Definition at line 28 of file parallel.cpp.

Member Function Documentation

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

Add an existing tween.

Parameters
tweenBase Tween (Ptr)

Definition at line 30 of file parallel.cpp.

void hx3d::tweens::Parallel::addRepeatingCallback ( std::function< void()>  func,
const float  duration 
)

Create a repeating callback.

Parameters
funcFunction
durationDuration

Definition at line 34 of file parallel.cpp.

template<class T >
void hx3d::tweens::Parallel::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 parallel.inl.hpp.

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

Update the tween.

Parameters
deltaDelta time

Implements hx3d::tweens::BaseTween.

Definition at line 48 of file parallel.cpp.


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