|
|
The Core Engine class serves as the main abstraction layer for the main program. All the other modules run from within this class. This is also the class that contains the main game loop. All the other engine objects are ran from within this class's methods.
|
|
|
|
|
|
####Constructor and Destructor:
|
|
|
#### Constructor and Destructor:
|
|
|
The constructor takes in the title, the width and the height of the main window (in that order). That's it. It uses that information to initialize a new [Window](https://github.com/sadmansk/GameEngine/wiki/Window-Class) and stores its address in `m_mainWindow`. It also constructs a new [Game](https://github.com/sadmansk/GameEngine/wiki/Game-Class) and stores that in `m_game`. `m_isRunning` is also initialized as `true`.
|
|
|
|
|
|
The destructor deletes and cleans up member pointers.
|
|
|
|
|
|
####Member Variables:
|
|
|
#### Member Variables:
|
|
|
| Name | Type | Visibility | Description |
|
|
|
|-------------------|----------|----------------|-----------------|
|
|
|
|`m_mainWindow`|[Window*](https://github.com/sadmansk/GameEngine/wiki/Window-Class)|`private`|Main Window that is displayed on the screen|
|
... | ... | @@ -15,7 +15,7 @@ The destructor deletes and cleans up member pointers. |
|
|
|`m_isRunning`|`bool`|`private`|Stores whether the engine is running or not, used for knowing when the end the game loop|
|
|
|
|`m_game`|[Game*](https://github.com/sadmansk/GameEngine/wiki/Game-Class)|`private`|Object for handling all game logic, input, game rendering, etc.|
|
|
|
|
|
|
####Member Functions:
|
|
|
#### Member Functions:
|
|
|
| Name | Return Type | Visibility | Parameters | Description |
|
|
|
|-------------------|----------|----------------|---------|--------|
|
|
|
|`Start()`|`void`|`public`| *none* | Starts the main engine and game loop by resetting the timer and invoke `Run()`|
|
... | ... | |