GA::kit v0.3
G&A's in-house C++ application framework
Loading...
Searching...
No Matches
ga::Timeline Class Reference

#include <timeline_component.h>

Inheritance diagram for ga::Timeline:
ga::Component

Public Member Functions

void update () override
 
template<typename T , typename Fn >
void add (std::shared_ptr< Tween< T > > tween, Fn updateFn=nullptr)
 
template<typename T >
void add (std::shared_ptr< Tween< T > > tween, std::function< void(const T &)> updateFn=nullptr)
 
template<typename T , typename Fn >
std::shared_ptr< Tween< T > > add (const T &startVal, const T &endVal, std::function< float(float)> easeFn, Fn updateFn=nullptr, std::function< void()> onDone=nullptr)
 
template<typename T >
std::shared_ptr< Tween< T > > add (const T &startVal, const T &endVal, std::function< float(float)> easeFn, std::function< void(const T &)> updateFn=nullptr, std::function< void()> onDone=nullptr)
 
template<typename T >
bool setTweenUpdate (std::shared_ptr< Tween< T > > tween, std::function< void(const T &)> updateFn)
 
void clear ()
 
std::vector< std::shared_ptr< TweenBase > > getTweens ()
 
bool isActive ()
 
- Public Member Functions inherited from ga::Component
 Component ()=default
 
virtual ~Component ()=default
 
 Component (const Component &other)
 
Componentoperator= (const Component &other)
 
std::shared_ptr< NodegetNode () const
 

Public Attributes

ga::Signal< Timeline * > onTimelineStart
 
ga::Signal< Timeline * > onTimelineDone
 

Protected Attributes

std::map< std::shared_ptr< TweenBase >, std::function< void(std::shared_ptr< TweenBase >)> > m_tweenRefMap
 
- Protected Attributes inherited from ga::Component
std::weak_ptr< Nodem_node
 

Additional Inherited Members

- Protected Member Functions inherited from ga::Component
virtual void update ()
 
virtual void draw ()
 
virtual void setNode (std::shared_ptr< Node > node)
 
virtual void setScene (std::shared_ptr< Scene > scene)
 

Member Function Documentation

◆ add() [1/4]

template<typename T , typename Fn >
std::shared_ptr< Tween< T > > ga::Timeline::add ( const T &  startVal,
const T &  endVal,
std::function< float(float)>  easeFn,
Fn  updateFn = nullptr,
std::function< void()>  onDone = nullptr 
)
inline

◆ add() [2/4]

template<typename T >
std::shared_ptr< Tween< T > > ga::Timeline::add ( const T &  startVal,
const T &  endVal,
std::function< float(float)>  easeFn,
std::function< void(const T &)>  updateFn = nullptr,
std::function< void()>  onDone = nullptr 
)
inline

◆ add() [3/4]

template<typename T , typename Fn >
void ga::Timeline::add ( std::shared_ptr< Tween< T > >  tween,
Fn  updateFn = nullptr 
)
inline

◆ add() [4/4]

template<typename T >
void ga::Timeline::add ( std::shared_ptr< Tween< T > >  tween,
std::function< void(const T &)>  updateFn = nullptr 
)
inline

◆ clear()

void ga::Timeline::clear ( )
inline

◆ getTweens()

std::vector< std::shared_ptr< TweenBase > > ga::Timeline::getTweens ( )
inline

◆ isActive()

bool ga::Timeline::isActive ( )
inline

◆ setTweenUpdate()

template<typename T >
bool ga::Timeline::setTweenUpdate ( std::shared_ptr< Tween< T > >  tween,
std::function< void(const T &)>  updateFn 
)
inline

◆ update()

void ga::Timeline::update ( )
inlineoverridevirtual

Reimplemented from ga::Component.

Member Data Documentation

◆ m_tweenRefMap

std::map<std::shared_ptr<TweenBase>, std::function<void( std::shared_ptr<TweenBase> )> > ga::Timeline::m_tweenRefMap
protected

◆ onTimelineDone

ga::Signal<Timeline*> ga::Timeline::onTimelineDone

◆ onTimelineStart

ga::Signal<Timeline*> ga::Timeline::onTimelineStart

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