16 Sprite(
const char* texture_file_name, Vector2 initial_position,
float scale = 1.0f,
float rotation = 0.0f) :
Drawable()
24 std::cout <<
"ERROR: Failed loading texture (" << texture_file_name <<
"), halting process" << std::endl;
Definition: drawable.hpp:13
Drawable()
Sets the sprites' IDs.
Definition: drawable.cpp:8
void SetPosition(Vector2 position)
Sets the position of the sprites.
Definition: sprite.cpp:8
void Draw() override
Draws the sprites.
Definition: sprite.cpp:39
Vector2 sprite_position
Definition: sprite.hpp:10
float GetWidth()
Gets the width of the sprites.
Definition: sprite.cpp:24
void SetScale(float scale)
Sets the scale of the sprites.
Definition: sprite.cpp:3
void SetRotation(float rotation)
Sets the rotation of the sprites.
Definition: sprite.cpp:14
float sprite_scale_factor
Definition: sprite.hpp:12
float GetHeight()
Gets the height of the sprites.
Definition: sprite.cpp:29
float GetRotation()
Gets the exact rotation of the sprites.
Definition: sprite.cpp:34
float sprite_rotation
Definition: sprite.hpp:13
Vector2 GetPosition()
Gets the position of the sprites.
Definition: sprite.cpp:19
Sprite(const char *texture_file_name, Vector2 initial_position, float scale=1.0f, float rotation=0.0f)
Definition: sprite.hpp:16
Texture2D sprite_texture
Definition: sprite.hpp:11
virtual ~Sprite()
Definition: sprite.hpp:31