|
RType
|
#include <Drawable.hpp>


Public Member Functions | |
| Drawable () | |
| Construct a new Drawable:: Drawable object. More... | |
| char * | getAttribute () const |
| getAttribute, get the attribute More... | |
| void | setAttribute (std::string attribute) |
| setAttribute, set the attribute More... | |
| Position | getPosition () const |
| getPosition, get the position More... | |
| void | setPosition (std::tuple< float, float > position) |
| setPosition, set the position More... | |
| Size | getSize () const |
| getSize, get the size More... | |
| void | setSize (std::tuple< float, float > size) |
| setSize, set the size More... | |
| float | getScale () const |
| getScale, get the scale More... | |
| void | setScale (float scale) |
| setScale, set the scale More... | |
| Rect | getRect () const |
| getRect, get the rect More... | |
| void | setRect (std::tuple< int, int, int, int > rect) |
| setRect, set the rect More... | |
| std::shared_ptr< Packet > | getPacket () |
| getPacket, get the packet More... | |
| void | setHasChanged (bool hasChanged) |
| setHasChanged, set if the drawable has changed More... | |
| bool | getHasChanged () const |
| getHasChanged, get if the drawable has changed More... | |
| void | addDrawableCollision (std::shared_ptr< Drawable > drawableCollision) |
| addDrawableCollision, add a drawable collision More... | |
| std::vector< std::shared_ptr< Drawable > > | getDrawablesCollision () const |
| getDrawablesCollision, get the drawables collision More... | |
Public Member Functions inherited from IComponentRType | |
| virtual | ~IComponentRType ()=default |
| Construct a new IComponentRType object. More... | |
Public Attributes | |
| int | _textureId |
| bool | _toDelete = false |
| int | _score = 0 |
Protected Attributes | |
| Position | _position |
| Size | _size |
| Rect | _rect |
| float | _scale |
| bool | hasChanged = false |
| std::vector< std::shared_ptr< Drawable > > | _drawablesCollision |
Protected Attributes inherited from IComponentRType | |
| char * | _attribute |
Definition at line 21 of file Drawable.hpp.
| Drawable::Drawable | ( | ) |
Construct a new Drawable:: Drawable object.
Definition at line 16 of file Drawable.cpp.
References IComponentRType::_attribute, _textureId, setPosition(), setRect(), and setSize().

| void Drawable::addDrawableCollision | ( | std::shared_ptr< Drawable > | drawableCollision | ) |
addDrawableCollision, add a drawable collision
| drawableCollision |
Definition at line 170 of file Drawable.cpp.
|
virtual |
getAttribute, get the attribute
Implements IComponentRType.
Definition at line 30 of file Drawable.cpp.
References IComponentRType::_attribute.
| std::vector< std::shared_ptr< Drawable > > Drawable::getDrawablesCollision | ( | ) | const |
getDrawablesCollision, get the drawables collision
Definition at line 179 of file Drawable.cpp.
| bool Drawable::getHasChanged | ( | ) | const |
getHasChanged, get if the drawable has changed
Definition at line 161 of file Drawable.cpp.
References hasChanged.
| std::shared_ptr< Packet > Drawable::getPacket | ( | ) |
getPacket, get the packet
Definition at line 125 of file Drawable.cpp.
References IComponentRType::_attribute, _textureId, drawable::attribute, drawable::attribute2, and drawable::id.
| std::tuple< float, float > Drawable::getPosition | ( | ) | const |
getPosition, get the position
setAttribute, set the attribute
| attribute | (srd::tuple<float, float>) |
Definition at line 51 of file Drawable.cpp.
| std::tuple< int, int, int, int > Drawable::getRect | ( | ) | const |
getRect, get the rect
Definition at line 106 of file Drawable.cpp.
| float Drawable::getScale | ( | ) | const |
getScale, get the scale
Definition at line 79 of file Drawable.cpp.
References _scale.
| std::tuple< float, float > Drawable::getSize | ( | ) | const |
getSize, get the size
Definition at line 70 of file Drawable.cpp.
|
virtual |
setAttribute, set the attribute
| attribute |
Implements IComponentRType.
Definition at line 39 of file Drawable.cpp.
References IComponentRType::_attribute, and hasChanged.
| void Drawable::setHasChanged | ( | bool | hasChanged | ) |
setHasChanged, set if the drawable has changed
| hasChanged |
Definition at line 152 of file Drawable.cpp.
References hasChanged.
| void Drawable::setPosition | ( | std::tuple< float, float > | position | ) |
setPosition, set the position
| position |
Definition at line 60 of file Drawable.cpp.
References hasChanged.
Referenced by Drawable().

| void Drawable::setRect | ( | std::tuple< int, int, int, int > | rect | ) |
setRect, set the rect
| rect |
Definition at line 115 of file Drawable.cpp.
References hasChanged.
Referenced by Drawable().

| void Drawable::setScale | ( | float | scale | ) |
setScale, set the scale
| scale |
Definition at line 97 of file Drawable.cpp.
References _scale.
| void Drawable::setSize | ( | std::tuple< float, float > | size | ) |
setSize, set the size
| size |
Definition at line 88 of file Drawable.cpp.
References hasChanged.
Referenced by Drawable().

|
protected |
Definition at line 153 of file Drawable.hpp.
|
protected |
Definition at line 148 of file Drawable.hpp.
|
protected |
Definition at line 150 of file Drawable.hpp.
|
protected |
Definition at line 151 of file Drawable.hpp.
Referenced by getScale(), and setScale().
| int Drawable::_score = 0 |
Definition at line 145 of file Drawable.hpp.
|
protected |
Definition at line 149 of file Drawable.hpp.
| int Drawable::_textureId |
Definition at line 143 of file Drawable.hpp.
Referenced by Drawable(), and getPacket().
| bool Drawable::_toDelete = false |
Definition at line 144 of file Drawable.hpp.
|
protected |
Definition at line 152 of file Drawable.hpp.
Referenced by getHasChanged(), setAttribute(), setHasChanged(), setPosition(), setRect(), and setSize().