4 #include "../../utils/timer.h" 37 glm::vec2 m_SpriteSheetDimension;
39 double m_CurrentFrameRate;
107 void addedRigidBody2D()
override;
117 inline const float getTotalFrames()
const {
return (m_SpriteSheetDimension.x * m_SpriteSheetDimension.y); }
119 void submit(
Renderer2D* renderer)
const override;
120 void setSpriteSheetUV()
const;
float & rotation
The rotation of the Sprite.
Definition: sprite.h:35
SpriteAnimationType
The type of sprite sheet animation.
Definition: sprite.h:9
Timer class to keep track of the time.
Definition: timer.h:8
glm::vec4 & color
The color of the Sprite.
Definition: sprite.h:31
The Class responsible for drawing the basic Renderable objects onto the screen.
Definition: renderable2d.h:36
The class responsible for loading Textures.
Definition: texture.h:11
std::uint32_t frame
The frame number in the sprite sheet.
Definition: sprite.h:23
std::uint32_t frameRate
The rate at which the frames are displayed.
Definition: sprite.h:27
Definition: audioclip.cpp:3
glm::vec3 & position
The position of the Sprite.
Definition: sprite.h:29
The class responsible for creating amazing shaders.
Definition: Shader.h:22
The class responsible for drawing the Sprites in the scene.
Definition: sprite.h:17
Primitive2D
Different variations of primitives.
Definition: renderable2d.h:26
Forward declaration of the graphics::Renderable2D.
Definition: renderer2d.h:15
glm::vec2 & size
The size of the Sprite.
Definition: sprite.h:33
const float getTotalFrames() const
Gets the total frames in the sprite sheet.
Definition: sprite.h:117