|
Potato Engine
|
User controllable character. More...
#include <Player.hpp>
Protected Member Functions | |
| virtual void | BeginPlay () override |
| Gameplay start. | |
| virtual void | Tick (float dt) override |
| Update tick event. | |
Additional Inherited Members | |
| Public Member Functions inherited from Entity | |
| float | TakeDamage (float damage) |
| Delivers damage to the entity. | |
| float | AddHealth (float amount) |
| Adds health to entity. | |
| float | GetHealth () const |
| Gets health. | |
| Public Member Functions inherited from Actor | |
| 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 inherited from Actor | |
| char | Texture |
| Protected Attributes inherited from Entity | |
| float | Health |
| float | MaxHealth |
User controllable character.
Definition at line 11 of file Player.hpp.
| Player::Player | ( | ) |
Definition at line 13 of file Player.cpp.
|
virtual |
Definition at line 29 of file Player.cpp.
|
overrideprotectedvirtual |
Gameplay start.
Put all pre-gameplay functionality here
Reimplemented from Actor.
Definition at line 16 of file Player.cpp.
|
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 Actor.
Definition at line 22 of file Player.cpp.