Base class for scriptable entities within a scene.
More...
#include <ScriptableEntity.h>
|
| virtual void | OnCreate () |
| | Sets the entity associated with this scriptable entity.
|
| virtual void | OnDestroy () |
| | Called when the entity is destroyed.
|
| virtual void | OnUpdate (Timestep ts) |
| | Called every frame to update the entity.
|
Base class for scriptable entities within a scene.
A ScriptableEntity allows for custom behavior to be defined for entities in a scene, not already provided as standardized components.
◆ ~ScriptableEntity()
| virtual Vesper::ScriptableEntity::~ScriptableEntity |
( |
| ) |
|
|
inlinevirtual |
◆ GetComponent()
template<typename T>
| T & Vesper::ScriptableEntity::GetComponent |
( |
| ) |
|
|
inline |
Retrieves a reference to a component of type T attached to the entity.
- Template Parameters
-
| T | The type of the component to retrieve. |
- Returns
- Reference to the component of type T. Will assert if the component does not exist.
22 {
24 }
Entity m_Entity
Definition ScriptableEntity.h:45
@ T
Definition KeyCodes.h:57
◆ OnCreate()
| virtual void Vesper::ScriptableEntity::OnCreate |
( |
| ) |
|
|
inlineprotectedvirtual |
Sets the entity associated with this scriptable entity.
Meant for internal use by the Scene class. Should be overridden in derived classes if additional setup is required when the entity is set.
◆ OnDestroy()
| virtual void Vesper::ScriptableEntity::OnDestroy |
( |
| ) |
|
|
inlineprotectedvirtual |
Called when the entity is destroyed.
Meant for internal use by the Scene class. Should be overridden in derived classes to handle cleanup.
◆ OnUpdate()
| virtual void Vesper::ScriptableEntity::OnUpdate |
( |
Timestep | ts | ) |
|
|
inlineprotectedvirtual |
Called every frame to update the entity.
- Parameters
-
| ts | The timestep representing the time elapsed since the last update. Custom behavior should be implemented here in derived classes. |
◆ Scene
◆ m_Entity
| Entity Vesper::ScriptableEntity::m_Entity |
|
private |
The documentation for this class was generated from the following file: