|
Bomberman
|
A component to place on entities that can move or be moved. More...
#include <MovableComponent.hpp>
Public Member Functions | |
| void | addForce (Vector3f force) |
| Add an instant force to this entity. More... | |
| const Vector3f & | getVelocity (void) const |
| Get velocity. More... | |
| WAL::Component * | clone (WAL::Entity &entity) const override |
| Clone a component for another or the same entity. More... | |
| MovableComponent (WAL::Entity &entity) | |
| Create a new movable component. More... | |
| MovableComponent (const MovableComponent &)=default | |
| A movable component is copy constructable. More... | |
| ~MovableComponent () override=default | |
| A default destructor. More... | |
| MovableComponent & | operator= (const MovableComponent &)=delete |
| A movable component is not assignable. More... | |
Public Member Functions inherited from WAL::Component | |
| Component & | operator= (const Component &)=delete |
| A component can't be assigned. More... | |
| virtual | ~Component ()=default |
| A virtual destructor. More... | |
| virtual void | onStart () |
| The entity or this component has just been enabled. More... | |
| virtual void | onStop () |
| The entity or this component has just been disable. More... | |
Private Attributes | |
| Vector3f | _acceleration |
| The acceleration of this entity. More... | |
| Vector3f | _velocity |
| The velocity of the entity. More... | |
Friends | |
| class | MovableSystem |
| class | MapGenerator |
Additional Inherited Members | |
Protected Member Functions inherited from WAL::Component | |
| Component (Entity &entity) | |
| A component can't be instantiated, it should be derived. More... | |
| Component (const Component &)=default | |
| A component can't be instantiated, it should be derived. More... | |
Protected Attributes inherited from WAL::Component | |
| Entity & | _entity |
| The entity that own this component. More... | |
A component to place on entities that can move or be moved.
|
explicit |
Create a new movable component.
|
default |
A movable component is copy constructable.
|
overridedefault |
A default destructor.
| void BBM::MovableComponent::addForce | ( | Vector3f | force | ) |
Add an instant force to this entity.
| force | The force to add to this entity's acceleration. The force is added instantly and in one go. |
|
overridevirtual |
Clone a component for another or the same entity.
| entity | The entity that owns the ne component. |
Implements WAL::Component.
| const Vector3f & BBM::MovableComponent::getVelocity | ( | void | ) | const |
Get velocity.
|
delete |
A movable component is not assignable.
|
friend |
|
friend |
|
private |
The acceleration of this entity.
|
private |
The velocity of the entity.
1.8.17