TurtleBrains  0.3.5
High quality, portable, C++ framework for rapid 2D game development.
tb_entity_behavior_interface.hpp
1 
9 #ifndef TurtleBrains_EntityBehaviorInterface_hpp
10 #define TurtleBrains_EntityBehaviorInterface_hpp
11 
12 #include <turtle_brains/game/tb_entity.hpp>
13 #include <turtle_brains/core/tb_noncopyable.hpp>
14 
15 namespace TurtleBrains
16 {
17  namespace Game
18  {
19 
25  {
26  public:
27 
31  explicit EntityBehaviorInterface(Entity& entity);
32 
37  virtual ~EntityBehaviorInterface(void) = 0;
38 
39  protected:
46 
51  virtual void OnAdd(void);
52 
56  virtual void OnRemove(void);
57 
62  virtual void OnPause(void);
63 
68  virtual void OnResume(void);
69 
74  virtual void OnSimulate(void);
75 
80  virtual void OnUpdate(const float deltaTime);
81 
86  virtual void OnRender(void) const;
87 
92  virtual void OnCollide(const Entity& withOther);
93 
94  private:
95  friend class Entity;
96  };
97 
98  }; /* namespace Game */
99 }; /* namespace TurtleBrains */
100 
101 namespace tbGame = TurtleBrains::Game;
102 
103 #endif /* TurtleBrains_EntityBehaviorInterface_hpp */
virtual void OnCollide(const Entity &withOther)
Definition: tb_entity.hpp:46
Entity & mEntity
Definition: tb_entity_behavior_interface.hpp:45
Definition: tb_entity_behavior_interface.hpp:24
virtual void OnUpdate(const float deltaTime)
Definition: tb_noncopyable.hpp:22
Here is some information about the primary namespace.
Definition: tb_application_dialog.hpp:21
This is the heart of TurtleBrains for game developers to create GameScenes and Entities to interact w...