Abstract class representing an entity.
More...
#include <EntitySystem.hpp>
Abstract class representing an entity.
◆ ~Entity()
virtual OficinaFramework::EntitySystem::Entity::~Entity |
( |
| ) |
|
|
inlinevirtual |
Destructor for the entity.
References GetAngle(), GetName(), GetParent(), GetPosition(), GetProperties(), GetProperty(), Initialize(), IsMarkedForRemoval(), RemoveMe(), SetAngle(), SetName(), SetParent(), SetPosition(), SetProperties(), SetProperty(), and Update().
◆ GetAngle()
float OficinaFramework::EntitySystem::Entity::GetAngle |
( |
| ) |
const |
Gets the angle of the entity.
- Returns
- Current angle of the entity.
◆ GetName()
std::string OficinaFramework::EntitySystem::Entity::GetName |
( |
| ) |
const |
Gets the name of the entity.
- Returns
- Entity name.
◆ GetParent()
Gets entity collection that manages this entity.
- Returns
- A pointer to the entity collection that manages this entity.
◆ GetPosition()
vec2 OficinaFramework::EntitySystem::Entity::GetPosition |
( |
| ) |
const |
Gets the position of the entity.
- Returns
- Current position of the entity.
◆ GetProperties()
qword OficinaFramework::EntitySystem::Entity::GetProperties |
( |
| ) |
const |
Gets the whole properties mask of the entity.
- Returns
- The actual properties mask.
◆ GetProperty()
bool OficinaFramework::EntitySystem::Entity::GetProperty |
( |
byte |
ID | ) |
const |
Gets the state of a single property on the properties mask.
- Parameters
-
ID | ID ranged 0~63 of the actual property. |
- Returns
- The actual property state.
- Warning
- Giving and ID beyond 63 will always return false.
◆ Initialize()
virtual void OficinaFramework::EntitySystem::Entity::Initialize |
( |
| ) |
|
|
pure virtual |
◆ IsMarkedForRemoval()
bool OficinaFramework::EntitySystem::Entity::IsMarkedForRemoval |
( |
| ) |
|
Gets if the current entity is marked for removal.
- Returns
- Whether the entity is marked for removal or not.
- Warning
- If the entity is on a collection, it will be removed on the collection's next update call.
◆ RemoveMe()
void OficinaFramework::EntitySystem::Entity::RemoveMe |
( |
| ) |
|
Marks the current entity for removal.
- Warning
- If the entity is on a collection, it will be removed on the collection's next update call.
◆ SetAngle()
void OficinaFramework::EntitySystem::Entity::SetAngle |
( |
float |
Angle | ) |
|
Sets the angle of the entity.
- Parameters
-
Angle | Angle to be given to the entity. |
◆ SetName()
void OficinaFramework::EntitySystem::Entity::SetName |
( |
std::string |
name | ) |
|
Sets the name of the entity.
- Parameters
-
name | Name to be given to the entity. |
◆ SetParent()
Sets a pointer to the entity collection that manages this entity.
- Parameters
-
- Attention
- This method is automatically used when adding the entity to a collection. Use at your own risk.
◆ SetPosition()
void OficinaFramework::EntitySystem::Entity::SetPosition |
( |
vec2 |
Position | ) |
|
Sets the position of the entity.
- Parameters
-
Position | Position to be given to the entity. |
◆ SetProperties()
void OficinaFramework::EntitySystem::Entity::SetProperties |
( |
qword |
newmask | ) |
|
Sets the whole properties mask of the entity.
- Parameters
-
newmask | Mask to replace the properties mask for. |
- Warning
- Use this carefully! You might mess up with your entities' properties.
◆ SetProperty()
void OficinaFramework::EntitySystem::Entity::SetProperty |
( |
byte |
ID, |
|
|
bool |
state |
|
) |
| |
Sets the state of a single property on the properties mask.
- Parameters
-
ID | ID ranged 0~63 of the actual property. |
state | Desired state of the property to be set. |
- Warning
- Giving and ID beyond 63 will have no effect.
◆ Update()
virtual void OficinaFramework::EntitySystem::Entity::Update |
( |
| ) |
|
|
pure virtual |
◆ m_angle
float OficinaFramework::EntitySystem::Entity::m_angle = 0.0f |
|
protected |
Angle of the entity, as per Gongly Script standard (2014).
◆ m_name
std::string OficinaFramework::EntitySystem::Entity::m_name |
|
protected |
◆ m_position
vec2 OficinaFramework::EntitySystem::Entity::m_position |
|
protected |
Position of the entity, as per Gongly Script standard (2014).
◆ m_properties
qword OficinaFramework::EntitySystem::Entity::m_properties = 0x0000000000000000u |
|
protected |
A set of 64 boolean properties fo the entity, as per Gongly Script standard (2014).
The documentation for this class was generated from the following file: