|
Potato Engine
|
Base actor class. More...
#include <Actor.hpp>
Public Member Functions | |
| Actor () | |
| Constructs actor object. | |
| Vector2 | GetPosition () const |
| Gets position. | |
| void | SetPosition (const Vector2 &position) |
| Sets position. | |
| Vector2 | GetSize () const |
| Gets size. | |
| void | SetSize (const Vector2 &size) |
| Sets size. | |
| float | GetRotation () const |
| Gets rotation. | |
| void | SetRotation (float rotation) |
| Sets rotation. | |
| void | AddLocalOffset (const Vector2 &offset) |
| Adds to location vector. | |
| void | AddLocalRotation (float rotation) |
| Adds to rotation value. | |
| bool | isVisible () const |
| Checks if actor visible. | |
| void | SetVisibility (bool visibility) |
| Sets visibility of actor. | |
| void | DispatchBeginPlay () |
| Internal function used to queue BeginPlay() on actor. | |
| Public Member Functions inherited from Tickable | |
| bool | isTicking () const |
| Checks if object is ticking. | |
| void | SetTicking (bool isEnabled) |
| Sets tick state for object. | |
Public Attributes | |
| char | Texture |
Protected Member Functions | |
| virtual void | BeginPlay () |
| Gameplay start. | |
| virtual void | Tick (float dt) override |
| Update tick event. | |
Base actor class.
This class represents a level object that exists in the game world. All objects that obey world physics must inherit from Actor base
| Actor::Actor | ( | ) |
Constructs actor object.
Put all class level functionality here (member initializations, default values, etc.)
| Vector2 Actor::GetPosition | ( | ) | const |
| void Actor::SetPosition | ( | const Vector2 & | position | ) |
| void Actor::SetSize | ( | const Vector2 & | size | ) |
| float Actor::GetRotation | ( | ) | const |
| void Actor::SetRotation | ( | float | rotation | ) |
| void Actor::AddLocalOffset | ( | const Vector2 & | offset | ) |
| void Actor::AddLocalRotation | ( | float | rotation | ) |
| bool Actor::isVisible | ( | ) | const |
| void Actor::SetVisibility | ( | bool | visibility | ) |
| void Actor::DispatchBeginPlay | ( | ) |
Internal function used to queue BeginPlay() on actor.
|
protectedvirtual |
|
overrideprotectedvirtual |
Update tick event.
This function is called every tick on the update step. Put all gameplay functionality that should run every update here (custom movement logic, etc.)
| dt | Deltatime; time elapsed since last frame in ms |
Reimplemented from Tickable.
Reimplemented in Player.