|
Simple C++ Game
|
A component that stores the information about where and how large the entity is. More...
#include <Components.hpp>


Public Member Functions | |
| LocationComponent () | |
| Construct a new Location Component object. More... | |
Public Member Functions inherited from Entity::Component | |
| Component (const std::string id) | |
| Construct a new Component object. More... | |
| virtual | ~Component () |
| This is only declared to make the class polymorphic so that dymaic_cast between Component types works. | |
| const std::string | getId () const |
| Get the ID of the component. This will return the same value for all instances of a class of Component. | |
Public Attributes | |
| sf::FloatRect | location |
| The location and bounds of the entity. | |
Static Public Attributes | |
| static const std::string | LOC_COMP_ID |
| The ID of LocationComponent. | |
A component that stores the information about where and how large the entity is.
| LocationComponent::LocationComponent | ( | ) |
Construct a new Location Component object.
The location sf::FloatRect defaults to size (0, 0) at the origin. If other values are desired, the caller must set them after initialization.