|
Turbo Engine 0.3
A C++ game engine using Allegro 5
|
Represent a drawable sprite. More...
#include <Sprite.hpp>
Public Member Functions | |
| Sprite (Texture *texture) | |
| void | draw () const override |
| Draw the drawable -_-. | |
| unsigned int | get_width () const |
| Get the width of the sprite. | |
| unsigned int | get_height () const |
| Get the height of the sprite. | |
| Texture * | get_texture () const |
| Get the source texture (not owned by the sprite). | |
Public Attributes | |
| Rectangle | rect = Rectangle<>() |
| Target texture region. | |
Protected Attributes | |
| Texture * | texture |
| Target texture. | |
Represent a drawable sprite.
| turbo::Sprite::Sprite | ( | Texture * | texture | ) |
|
overridevirtual |
Draw the drawable -_-.
Implements turbo::Drawable.
| unsigned int turbo::Sprite::get_height | ( | ) | const |
Get the height of the sprite.
|
inline |
Get the source texture (not owned by the sprite).
| unsigned int turbo::Sprite::get_width | ( | ) | const |
Get the width of the sprite.
|
protected |
Target texture.