KarmaEngine
Game Engine for practical learning and research purposes
|
Base class of all Karma's Layers. For instance KarmaGuiLayer. More...
#include <Layer.h>
Public Member Functions | |
Layer (const std::string &name="Layer") | |
A constructor. | |
virtual | ~Layer () |
A destructor. | |
virtual void | OnAttach ()=0 |
A function called on Layer when the Layer is pushed or OverLay is pushed. | |
virtual void | OnDetach ()=0 |
A function called on Layer when the LayerStack is destroyed. | |
virtual void | OnUpdate (float deltaTime)=0 |
Function called in each game loop. | |
virtual void | KarmaGuiRender (float deltaTime)=0 |
Function called in each game loop, specifically for rendering purposes. | |
virtual void | OnEvent (Event &event) |
For dispatching Events specific to the Layer. | |
const std::string & | GetName () const |
Getter for the name of the Layer (debugging purposes). | |
Protected Attributes | |
std::string | m_DebugName |
Base class of all Karma's Layers. For instance KarmaGuiLayer.
Karma::Layer::Layer | ( | const std::string & | name = "Layer" | ) |
A constructor.
|
virtual |
A destructor.
|
inline |
Getter for the name of the Layer (debugging purposes).
|
pure virtual |
Function called in each game loop, specifically for rendering purposes.
This is part of KarmaGui rendering sequence, thus different from OnUpdate().
Implemented in ExampleLayer, Karma::EditorLayer, and Karma::KarmaGuiLayer.
|
pure virtual |
A function called on Layer when the Layer is pushed or OverLay is pushed.
Implemented in ExampleLayer, Karma::EditorLayer, and Karma::KarmaGuiLayer.
|
pure virtual |
A function called on Layer when the LayerStack is destroyed.
Implemented in ExampleLayer, Karma::EditorLayer, and Karma::KarmaGuiLayer.
|
inlinevirtual |
For dispatching Events specific to the Layer.
Reimplemented in ExampleLayer, Karma::EditorLayer, and Karma::KarmaGuiLayer.
|
pure virtual |
Function called in each game loop.
deltaTime | The time step (or interval) gap between two consecutive calls (previous single loop iteration time) |
Implemented in ExampleLayer, Karma::EditorLayer, and Karma::KarmaGuiLayer.