YAGE  v0.1.4.0
Yet Another Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
engine.h
Go to the documentation of this file.
1 
9 #ifndef YAGE_CORE_ENGINE_H
10 #define YAGE_CORE_ENGINE_H
11 
12 #include "../core/window.h"
13 #include "system.h"
14 
15 #include <vector>
16 
17 namespace yage
18 {
19 
22 class Engine
23 {
24 public:
26  void init();
27 
29  void mainLoop();
30 
32  void update();
33 
35  void addSystem(System *system);
36 
39  static Engine &instance();
40 
41 private:
43  std::vector<System *> systems_;
44 
46  Window window_;
47 };
48 
49 } // namespace yage
50 
51 #endif
void addSystem(System *system)
Adds a system to the engine.
Definition: engine.cpp:43
static Engine & instance()
Returns the instance of the engine, as there is only one instance of the engine.
Definition: engine.cpp:48
System interface for the different systems in the engine.
Definition: system.h:18
Definition: window.h:30
Main engine class that contains a systems, the main loop and the update function that updates all the...
Definition: engine.h:22
void update()
Updates the systems.
Definition: engine.cpp:34
void init()
Initialize window and other aspects of the engine.
Definition: engine.cpp:14
void mainLoop()
Main game loop of the engine.
Definition: engine.cpp:23