TurtleBrains  0.3.1
High quality, portable, C++ framework for rapid 2D game development.
tb_game_scene.h
1 
9 #ifndef _TurtleBrains_GameSceneInterface_h_
10 #define _TurtleBrains_GameSceneInterface_h_
11 
12 #include "tb_entity_manager.h"
13 #include "../graphics/tb_graphic_list.h"
14 #include "../graphics/tb_camera.h"
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 
115  private:
116  tbGraphics::Camera mCamera;
117  float mAccumulatedSimulationTime;
118  };
119 
120  }; /* namespace Game */
121 }; /* namespace TurtleBrains */
122 
123 namespace tbGame = TurtleBrains::Game;
124 
125 #endif /* _TurtleBrains_GameSceneInterface_h_ */
virtual void OnRender(void) const
static void ChangeToScene(GameScene &gameScene)
Here is some information about the primary namespace.
Definition: tb_application_dialog.h:21
virtual void OnUpdate(const float deltaTime)
virtual void OnSimulate(void)
Definition: tb_game_scene.h:28
Definition: tb_camera.h:49
Definition: tb_entity_manager.h: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...