TurtleBrains  0.3.5
High quality, portable, C++ framework for rapid 2D game development.
tb_game_scene.hpp
1 
9 #ifndef TurtleBrains_GameSceneInterface_hpp
10 #define TurtleBrains_GameSceneInterface_hpp
11 
12 #include <turtle_brains/game/tb_entity_manager.hpp>
13 #include <turtle_brains/graphics/tb_graphic_list.hpp>
14 #include <turtle_brains/graphics/tb_camera.hpp>
15 
16 #include <list>
17 
18 namespace TurtleBrains
19 {
20  namespace Game
21  {
22 
28  class GameScene : public EntityManager
29  {
30  public:
31 
36  GameScene(void);
37 
42  virtual ~GameScene(void) = 0;
43 
54  static void ChangeToScene(GameScene& gameScene);
55 
65  static void PerformFrame(const float deltaTime);
66 
75  static void PerformFrame(GameScene& gameScene, const float deltaTime);
76 
77  protected:
84  virtual void OnSimulate(void);
85 
95  virtual void OnUpdate(const float deltaTime);
96 
100  virtual void OnRender(void) const;
101 
107  virtual void OnOpen(void);
108 
113  virtual void OnClose(void);
114 
118  virtual void OnRuntimeReload(void);
119 
120  private:
121  tbGraphics::Camera mCamera;
122  float mAccumulatedSimulationTime;
123  };
124 
125  }; /* namespace Game */
126 }; /* namespace TurtleBrains */
127 
128 namespace tbGame = TurtleBrains::Game;
129 
130 #endif /* TurtleBrains_GameSceneInterface_hpp */
virtual void OnRender(void) const
static void ChangeToScene(GameScene &gameScene)
Here is some information about the primary namespace.
Definition: tb_application_dialog.hpp:21
virtual void OnUpdate(const float deltaTime)
virtual void OnSimulate(void)
Definition: tb_game_scene.hpp:28
Definition: tb_camera.hpp:49
Definition: tb_entity_manager.hpp:32
static void PerformFrame(const float deltaTime)
virtual void OnOpen(void)
virtual void OnClose(void)
This is the heart of TurtleBrains for game developers to create GameScenes and Entities to interact w...
virtual void OnRuntimeReload(void)