9 #ifndef _TurtleBrainsExpress_TweeningBehavior_h_
10 #define _TurtleBrainsExpress_TweeningBehavior_h_
12 #include "../../game/tb_entity_behavior_interface.h"
13 #include "../../math/tb_interpolation.h"
19 typedef tbMath::Interpolation::InterpolationMode TweenMode;
27 mFinalValue(finalValue),
28 mStartValue(startValue),
47 inline void SetStartValue(
const Type& startValue) { mStartValue = startValue; }
52 inline Type GetCurrentTweenValue(
void)
const
54 if (
true == mTimer.
IsZero())
60 return tbMath::Interpolation::Interpolate(percentage, mStartValue, mFinalValue, mTweenMode);
77 const Type mFinalValue;
81 const TweenMode mTweenMode;
Definition: tb_entity.h:46
Entity & mEntity
Definition: tb_entity_behavior_interface.h:46
float GetPercentageOf(const GameTimer &timeValue) const
Definition: tb_entity_behavior_interface.h:25
A collection of objects and functions to express games quickly.
void SetStartValue(const Type &startValue)
Definition: tbx_tweening_behavior.h:47
virtual void OnSimulate(void)
virtual void OnSimulate(void) override
Definition: tbx_tweening_behavior.h:66
Definition: tbx_tweening_behavior.h:21
Contains high-level objects to control the entities in game worlds.
Definition: tb_game_timer.h:25