Claire's Game Engine
Full C++ Engine using OpenGL
|
#include <Camera.h>
Public Member Functions | |
void | SetupComponents () override |
Called to set up the actor's components after initialization. | |
void | Update () override |
Called every frame to update the actor and its component. | |
![]() | |
Actor () | |
virtual | ~Actor () |
void | SetScene (Scene *pScene) |
Sets the scene for this actor. | |
void | AddComponent (Component *pComponent) |
Adds a component to the actor. The component can be of various types (render, collider, etc.). | |
void | RemoveComponent (Component *pComponent) |
Removes a specific component from the actor. | |
void | UpdateComponentsTransform () |
Updates all components' world transforms. | |
void | SetActive (bool isActive) |
Sets the actor's active state, enabling or disabling components accordingly. | |
ActorState | GetState () const |
Returns the current state of the actor (Active, Paused, Dead). | |
Vector3 | GetPosition () const |
Returns the position of the actor in world space. | |
virtual void | Start () |
Called once at the start of the scene, after setup. | |
virtual void | Destroy () |
Called to destroy the actor, marking it as dead. | |
virtual void | OnCollide (Actor *collidedActor) |
Called when this actor collides with another actor. Override this to handle collision behavior. | |
template<typename C> | |
C * | GetComponentOfType () const |
Gets a component of a specific type attached to this actor. | |
Additional Inherited Members | |
![]() | |
Transform * | mTransform = nullptr |
Transform representing position, rotation, scale. | |
Scene * | mScene = nullptr |
Scene this actor belongs to. | |
|
inlineoverridevirtual |
Called to set up the actor's components after initialization.
Reimplemented from Actor.
|
overridevirtual |
Called every frame to update the actor and its component.
Reimplemented from Actor.