11#include <glfw/glfw3.h>
44 void LoadMap(
const char* mapName);
56 void BindAction(std::string name, std::function<
void()> action)
58 m_triggerCallbacks[name] = action;
66 if (m_triggerCallbacks.count(name))
67 m_triggerCallbacks[name]();
83 return m_physicsWorld;
90 AShader* m_mainShader =
nullptr;
91 IGame* m_game =
nullptr;
92 HMODULE m_gameLib =
nullptr;
93 GLFWwindow* m_window =
nullptr;
95 std::vector<AEntity*> m_entities;
96 std::vector<AVertex> m_worldVerts;
97 std::vector<AFace> m_worldFaces;
98 uint32_t m_worldVAO = 0, m_worldVBO = 0, m_worldEBO = 0;
99 uint32_t m_worldIndexCount = 0;
100 float m_lastFrameTime = 0.0f;
101 float m_deltaTime = 0.0f;
102 std::map<std::string, std::function<void()>> m_triggerCallbacks;
#define ANVIL_API
Definition ACore.h:6
The main engine class that manages the application lifecycle, rendering, entities,...
Definition AEngine.h:25
AEngine()
Constructor for AEngine.
Definition AEngine.cpp:14
AnvilPhysics * GetPhysics()
Gets the physics world instance.
Definition AEngine.h:81
void OnTrigger(std::string name)
Executes the action associated with the trigger name.
Definition AEngine.h:64
void LoadMap(const char *mapName)
Loads a map by name.
Definition AEngine.cpp:53
static AEngine * Get()
Gets the singleton instance of the engine.
Definition AEngine.h:73
void Run()
Main engine loop that runs the application.
Definition AEngine.cpp:161
void BindAction(std::string name, std::function< void()> action)
Binds an action to a trigger name.
Definition AEngine.h:56
AEntity * CreateEntity(std::string name)
Creates a new entity with the specified name.
Definition AEngine.cpp:145
Represents an entity in the game engine with position, rotation, scale and components.
Definition AEntity.h:16
Definition AResourceManager.h:8
A physics system class using ReactPhysics3D engine for physics simulation.
Definition AnvilPhysics.h:67