TurtleBrains  0.3.1
High quality, portable, C++ framework for rapid 2D game development.
tbx_scale_behaviors.h
1 
9 #ifndef _TurtleBrains_ScaleBehaviors_h_
10 #define _TurtleBrains_ScaleBehaviors_h_
11 
12 #include "tbx_tweening_behavior.h"
13 #include "../../game/tb_entity_behavior_interface.h"
14 #include "../../math/tb_vector.h"
15 
16 namespace TurtleBrainsExpress
17 {
18  namespace Behaviors
19  {
20 
26  {
27  public:
35  ScaleToBehavior(tbGame::Entity& entity, const float desiredScale, const float scaleSpeed);
36 
44  ScaleToBehavior(tbGame::Entity& entity, const tbMath::Vector2& desiredScale, const float scaleSpeed);
45 
49  virtual ~ScaleToBehavior(void);
50 
54  virtual void OnSimulate(void) override;
55 
56  private:
57  const tbMath::Vector2 mDesiredScale;
58  const float mScaleSpeed;
59  };
60 
61 
64  class ScaleTweenBehavior : public TweeningBehavior<tbMath::Vector2>
65  {
66  public:
69  ScaleTweenBehavior(tbGame::Entity& entity, const float desiredScale, const tbGame::GameTimer& time, const TweenMode& tweenMode);
70 
73  ScaleTweenBehavior(tbGame::Entity& entity, const tbMath::Vector2& desiredScale, const tbGame::GameTimer& time, const TweenMode& tweenMode);
74 
75 
78  virtual ~ScaleTweenBehavior(void);
79 
80 
84  virtual void OnResume(void) override;
85 
88  virtual void OnSimulate(void) override;
89 
90  private:
91  };
92 
93  }; /* namespace Behaviors */
94 }; /* namespace TurtleBrainsExpress */
95 
97 
98 #endif /* _TurtleBrains_ScaleBehaviors_h_ */
Definition: tb_vector.h:47
Definition: tb_entity.h:46
Definition: tb_entity_behavior_interface.h:25
A collection of objects and functions to express games quickly.
Definition: tbx_tweening_behavior.h:21
Definition: tbx_scale_behaviors.h:64
Contains high-level objects to control the entities in game worlds.
Definition: tbx_scale_behaviors.h:25
ScaleToBehavior(tbGame::Entity &entity, const float desiredScale, const float scaleSpeed)
Definition: tb_game_timer.h:25