Engine is the main class responsible for initializing and running the game. It manages the game loop, rendering, updating the game world, handling input, and managing scenes. The Engine class interacts with the renderer, window, and various game components, ensuring that the game runs efficiently and responds to user input.
More...
#include <Engine.h>
|
| Engine (std::string pTitle, std::vector< Scene * > pScene, IRenderer::RendererType pRendererType) |
| Constructor for Engine. Initializes the engine with a window title, a list of scenes, and a specified renderer type.
|
|
| ~Engine () |
| Destructor for Engine. Cleans up the renderer, window, and scenes.
|
|
| Engine (const Engine &)=delete |
|
Engine & | operator= (const Engine &)=delete |
|
void | Initialize (IRenderer::RendererType pRendererType) |
| Initializes the engine components, including the window, renderer, and first scene.
|
|
void | Loop () |
| Starts the main game loop. This function repeatedly updates the game state, processes input, and renders the game until the game is closed.
|
|
void | Render () |
| Renders the game by calling the renderer to draw all objects to the screen.
|
|
void | Update () |
| Updates the game state by calling the current scene's update function.
|
|
void | CheckForInputs () |
| Checks for input events such as keyboard and window events, and processes them.
|
|
void | Close () |
| Closes the engine, performing necessary cleanup tasks.
|
|
Engine is the main class responsible for initializing and running the game. It manages the game loop, rendering, updating the game world, handling input, and managing scenes. The Engine class interacts with the renderer, window, and various game components, ensuring that the game runs efficiently and responds to user input.
◆ Engine() [1/2]
Constructor for Engine. Initializes the engine with a window title, a list of scenes, and a specified renderer type.
- Parameters
-
pTitle | The title of the window. |
pScene | A vector of pointers to Scene objects. |
pRendererType | The type of renderer to use (e.g., SDL, OpenGL). |
◆ ~Engine()
Destructor for Engine. Cleans up the renderer, window, and scenes.
◆ Engine() [2/2]
Engine::Engine |
( |
const Engine & | | ) |
|
|
delete |
◆ CheckForInputs()
void Engine::CheckForInputs |
( |
| ) |
|
Checks for input events such as keyboard and window events, and processes them.
◆ Close()
Closes the engine, performing necessary cleanup tasks.
◆ Initialize()
Initializes the engine components, including the window, renderer, and first scene.
- Parameters
-
pRendererType | The type of renderer to use. |
◆ Loop()
Starts the main game loop. This function repeatedly updates the game state, processes input, and renders the game until the game is closed.
◆ operator=()
◆ Render()
Renders the game by calling the renderer to draw all objects to the screen.
◆ Update()
Updates the game state by calling the current scene's update function.
◆ mInDebugMode
bool Engine::mInDebugMode = false |
|
inlinestatic |
◆ mInWireframeMode
bool Engine::mInWireframeMode = false |
|
inlinestatic |
◆ mIsGamePaused
bool Engine::mIsGamePaused = false |
|
inlinestatic |
The documentation for this class was generated from the following files: