|
Potato Engine
|
Character with player-like attributes. More...
#include <Entity.hpp>
Public Member Functions | |
| 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. | |
Protected Attributes | |
| float | Health |
| float | MaxHealth |
Additional Inherited Members | |
| Public Attributes inherited from Actor | |
| char | Texture |
| Protected Member Functions inherited from Actor | |
| virtual void | BeginPlay () |
| Gameplay start. | |
| virtual void | Tick (float dt) override |
| Update tick event. | |
Character with player-like attributes.
Definition at line 9 of file Entity.hpp.
| Entity::Entity | ( | ) |
Definition at line 7 of file Entity.cpp.
|
virtual |
Definition at line 11 of file Entity.cpp.
| float Entity::TakeDamage | ( | float | damage | ) |
Delivers damage to the entity.
| damage | Damage to deliver |
Definition at line 15 of file Entity.cpp.
| float Entity::AddHealth | ( | float | amount | ) |
Adds health to entity.
| amount | Amount of health to add |
Definition at line 20 of file Entity.cpp.
| float Entity::GetHealth | ( | ) | const |
|
protected |
Definition at line 37 of file Entity.hpp.
|
protected |
Definition at line 38 of file Entity.hpp.