Clutter Engine 0.0.1
|
Public Member Functions | |
Zombie (clt::Level *pLevel, std::string pName="zombie") | |
void | Start () override |
Called when the actor is first created or spawned. | |
void | Update () override |
Virtual method to update the actor. | |
void | GetHit () |
![]() | |
Actor (Level *pLevel, std::string pName="Actor") | |
Constructor for the Actor class. | |
~Actor () | |
Destructor for the Actor class. | |
virtual void | Destroy () |
Called when the actor is being destroyed. | |
template<typename T , typename... Args> | |
T * | AddComponent (Args &&... args) |
Adds a component of type T to the actor. | |
template<typename T > | |
void | RemoveComponent () |
Removes a component of type T from the actor. | |
template<typename T > | |
T * | GetComponentOfType () |
Gets a pointer to the component of type T attached to this actor. | |
bool | LineTrace (Vector3 start, Vector3 direction, float maxDistance, raycastHit &hit, bool debugPersistant=false, bool ignoreSelf=true) |
Performs a line trace (raycast) from a start point in a direction. | |
Transform | GetTransform () const |
Gets the transform of the actor. | |
Vector3 | GetActorLocation () const |
Gets the position of the actor. | |
Vector3 | GetScale () const |
Gets the scale of the actor. | |
std::string | GetName () const |
Gets the name of the actor. | |
Quaternion | GetRotation () const |
Gets the rotation of the actor as a quaternion. | |
void | SetActorLocation (const Vector3 &loc) |
Sets the location of the actor. | |
void | SetActorLocation (const Vector2 &loc) |
Sets the location of the actor using a 2D vector. | |
void | SetActorScale (const Vector3 &scale) |
Sets the scale of the actor. | |
void | SetActorScale (const Vector2 &scale) |
Sets the scale of the actor using a 2D vector. | |
void | SetActorScale (float scale) |
Sets the uniform scale of the actor. | |
void | SetActorRotation (const Quaternion &rot) |
Sets the rotation of the actor. | |
void | SetActorRotation (float rot) |
Sets the rotation of the actor using a float value. | |
void | SetActorRotation (const Vector3 &rot) |
Sets the rotation of the actor using a vector (Euler angles). | |
void | SetActorTransform (const Vector3 &location, const Vector3 &rotation, const Vector3 &scale) |
Sets the transform of the actor. | |
void | AddActorLocationOffset (const Vector3 &locOffset) |
Adds an offset to the actor's location. | |
void | AddActorLocationOffset (const Vector2 &locOffset) |
Adds an offset to the actor's location using a 2D vector. | |
void | AddActorRotationOffset (Quaternion rotOffset) |
Adds an offset to the actor's rotation. | |
void | AddActorRotationOffset (Vector3 rotOffset) |
Adds an offset to the actor's rotation using a vector (Euler angles). | |
void | AddActorRotationOffset (float rotOffset) |
Adds an offset to the actor's rotation using a float value. | |
Level * | GetLevel () const |
Gets the level the actor is attached to. | |
Additional Inherited Members | |
![]() | |
friend | Level |
|
overridevirtual |
Called when the actor is first created or spawned.
Override this method to implement custom initialization logic.
Reimplemented from clt::Actor.
|
overridevirtual |
Virtual method to update the actor.
Override this method to implement custom per-frame update logic.
Reimplemented from clt::Actor.