9 #ifndef TurtleBrainsExpress_TweeningBehavior_hpp
10 #define TurtleBrainsExpress_TweeningBehavior_hpp
12 #include <turtle_brains/game/tb_entity_behavior_interface.hpp>
13 #include <turtle_brains/game/tb_game_timer.hpp>
14 #include <turtle_brains/math/tb_interpolation.hpp>
20 typedef tbMath::Interpolation::InterpolationMode TweenMode;
44 mFinalValue(finalValue),
45 mStartValue(startValue),
69 mStartValue = startValue;
78 if (
true == mTimer.
IsZero())
84 return tbMath::Interpolation::Interpolate(percentage, mStartValue, mFinalValue, mTweenMode);
110 const Type mFinalValue;
114 const TweenMode mTweenMode;
virtual void OnRemove(void)
Definition: tb_entity.hpp:46
TweeningBehavior(tbGame::Entity &entity, const Type &startValue, const Type &finalValue, const tbGame::GameTimer &time, const TweenMode &tweenMode)
Definition: tbx_tweening_behavior.hpp:41
Entity & mEntity
Definition: tb_entity_behavior_interface.hpp:45
float GetPercentageOf(const GameTimer &timeValue) const
Definition: tb_entity_behavior_interface.hpp:24
A collection of objects and functions to express games quickly.
Type GetCurrentTweenValue(void) const
Definition: tbx_tweening_behavior.hpp:76
void SetStartValue(const Type &startValue)
Definition: tbx_tweening_behavior.hpp:67
virtual void OnSimulate(void)
virtual void OnSimulate(void) override
Definition: tbx_tweening_behavior.hpp:99
Definition: tbx_tweening_behavior.hpp:26
EntityBehaviorInterface(Entity &entity)
Contains high-level objects to control the entities in game worlds.
This is the heart of TurtleBrains for game developers to create GameScenes and Entities to interact w...
virtual ~TweeningBehavior(void)
Definition: tbx_tweening_behavior.hpp:55
Definition: tb_game_timer.hpp:25
virtual void OnRemove(void) override
Definition: tbx_tweening_behavior.hpp:90