TurtleBrains  0.3.1
High quality, portable, C++ framework for rapid 2D game development.
tb_entity_behavior_interface.h
1 
9 #ifndef _TurtleBrains_EntityBehaviorInterface_h_
10 #define _TurtleBrains_EntityBehaviorInterface_h_
11 
12 #include "tb_entity.h"
13 #include "../core/tb_noncopyable.h"
14 #include "../game/tb_game_timer.h"
15 
16 namespace TurtleBrains
17 {
18  namespace Game
19  {
20 
26  {
27  public:
28 
32  explicit EntityBehaviorInterface(Entity& entity);
33 
38  virtual ~EntityBehaviorInterface(void) = 0;
39 
40  protected:
47 
52  virtual void OnAdd(void);
53 
57  virtual void OnRemove(void);
58 
63  virtual void OnPause(void);
64 
69  virtual void OnResume(void);
70 
75  virtual void OnSimulate(void);
76 
81  virtual void OnUpdate(const float deltaTime);
82 
87  virtual void OnRender(void) const;
88 
93  virtual void OnCollide(const Entity& withOther);
94 
95  private:
96  friend class Entity;
97  };
98 
99  }; /* namespace Game */
100 }; /* namespace TurtleBrains */
101 
102 namespace tbGame = TurtleBrains::Game;
103 
104 #endif /* _TurtleBrains_EntityBehaviorInterface_h_ */
virtual void OnCollide(const Entity &withOther)
Definition: tb_entity.h:46
Entity & mEntity
Definition: tb_entity_behavior_interface.h:46
Definition: tb_entity_behavior_interface.h:25
virtual void OnUpdate(const float deltaTime)
Definition: tb_noncopyable.h:22
Here is some information about the primary namespace.
Definition: tb_application_dialog.h:21
This is the heart of TurtleBrains for game developers to create GameScenes and Entities to interact w...