2#include <box2cpp/debug_imgui_renderer.h>
15 explicit Layer(std::string name);
61 void SetModal(
const bool state) { m_Modal = state; }
66 [[nodiscard]]
bool IsModal()
const {
return m_Modal; }
72 [[nodiscard]] std::string_view
GetName()
const {
return m_Name; }
79 std::expected<void, CoriError<>>
BindScene(
const std::string& name);
101 void SceneTickrateUpdate(
GameTimer& gameTimer) {
105 void SceneImGuiRender(GameTimer& gameTimer) {
109 bool m_Modal{
false };
An abstract class that is ment to be used as a template for defining events.
A GameTimer is responsible for managing everything that is connected with time, ticks,...
std::string_view GetName() const
Returns the name of the Layer.
virtual void OnImGuiRender(GameTimer &gameTimer)
Run every frame, this is the method where you do all the ImGui stuff.
void SetModal(const bool state)
Change the Layer modal state.
virtual void OnDetach()
Method that runs when the layer gets detached to the LayerStack.
virtual void OnUpdate(GameTimer &gameTimer)
Run every frame.
bool IsModal() const
Checks if the Layer is modal.
std::expected< void, CoriError<> > BindScene(const std::string &name)
Binds the Scene to the Layer.
World::SceneHandle ActiveScene
A SceneHandle to the Scene that is currently bound.
static Physics::DebugImguiRenderer m_DebugImGuiRenderer
virtual void OnTickUpdate(GameTimer &gameTimer)
Run every tick.
std::expected< void, CoriError<> > UnbindScene()
Unbinds the Scene from the Layer.
virtual void OnAttach()
Method that runs when the layer gets attached to the LayerStack.
virtual void OnEvent(Event &event)
This is the method to handle all the event at.
A handle for the scene, checks for scene validity before any call to the scene, if scene is invalid a...
void OnTickUpdate(Core::GameTimer &gameTimer)
void OnImGuiRender(Core::GameTimer &gameTimer)
Core systems of the engine are here.