The main engine class that manages the application lifecycle, rendering, entities, and game logic.
More...
#include <AEngine.h>
|
| | AEngine () |
| | Constructor for AEngine.
|
| virtual | ~AEngine () |
| | Virtual destructor for AEngine.
|
| void | Run () |
| | Main engine loop that runs the application.
|
| void | LoadMap (const char *mapName) |
| | Loads a map by name.
|
| AEntity * | CreateEntity (std::string name) |
| | Creates a new entity with the specified name.
|
| void | BindAction (std::string name, std::function< void()> action) |
| | Binds an action to a trigger name.
|
| void | OnTrigger (std::string name) |
| | Executes the action associated with the trigger name.
|
| AnvilPhysics * | GetPhysics () |
| | Gets the physics world instance.
|
|
| static AEngine * | Get () |
| | Gets the singleton instance of the engine.
|
The main engine class that manages the application lifecycle, rendering, entities, and game logic.
◆ AEngine()
Constructor for AEngine.
Constructor for AEngine class Initializes the engine components including window, OpenGL context, physics world, shader, resource manager, and loads the game DLL
◆ ~AEngine()
◆ BindAction()
| void AEngine::BindAction |
( |
std::string | name, |
|
|
std::function< void()> | action ) |
|
inline |
Binds an action to a trigger name.
- Parameters
-
| name | The trigger name to bind to |
| action | The function to execute when the trigger is activated |
◆ CreateEntity()
| AEntity * AEngine::CreateEntity |
( |
std::string | name | ) |
|
Creates a new entity with the specified name.
- Parameters
-
| name | The name for the new entity |
- Returns
- Pointer to the created entity
Creates a new entity and adds it to the engine's entity list
- Parameters
-
| name | The name to assign to the new entity |
- Returns
- Pointer to the newly created entity
◆ Get()
Gets the singleton instance of the engine.
- Returns
- Pointer to the engine instance
◆ GetPhysics()
Gets the physics world instance.
- Returns
- Pointer to the physics world
◆ LoadMap()
| void AEngine::LoadMap |
( |
const char * | mapName | ) |
|
Loads a map by name.
- Parameters
-
| mapName | The name of the map to load |
Loads a map file into the engine
- Parameters
-
| mapName | Name of the map file to load (without extension) |
◆ OnTrigger()
| void AEngine::OnTrigger |
( |
std::string | name | ) |
|
|
inline |
Executes the action associated with the trigger name.
- Parameters
-
| name | The trigger name to activate |
◆ Run()
Main engine loop that runs the application.
Main game loop for the engine Handles updating game state, physics, and rendering
The documentation for this class was generated from the following files: