Thrive
game.h
1 #pragma once
2 
3 #include <boost/chrono.hpp>
4 #include <memory>
5 
6 namespace thrive {
7 
8 class Engine;
9 class EntityManager;
10 
16 class Game {
17 
18 public:
19 
20 
25  static Game&
26  instance();
27 
31  ~Game();
32 
36  Engine&
37  engine();
38 
42  void
43  quit();
44 
48  void
49  run();
50 
54  boost::chrono::microseconds
55  targetFrameDuration() const;
56 
60  unsigned short
61  targetFrameRate() const;
62 
63 private:
64 
65  Game();
66 
67  struct Implementation;
68  std::unique_ptr<Implementation> m_impl;
69 };
70 
71 }
Engine & engine()
Returns the game's engine.
Definition: game.cpp:52
The main entry point for the game.
Definition: game.h:16
void quit()
Stops all engines and quits the application.
Definition: game.cpp:58
void run()
Starts all engines.
Definition: game.cpp:64
Definition: bullet_ogre_conversion.h:6
~Game()
Destructor.
Definition: game.cpp:48
static Game & instance()
Singleton instance.
Definition: game.cpp:36
boost::chrono::microseconds targetFrameDuration() const
The target frame duration.
Definition: game.cpp:101
The heart of the game.
Definition: engine.h:55
unsigned short targetFrameRate() const
The target frame rate.
Definition: game.cpp:107