4 #include "../../Core/C_Vec2.h"
5 #include "../../Core/C_Timer.h"
37 virtual void update(
float dt) = 0;
43 void draw(SDL_Renderer* renderer);
C_Vec2 spriteIndex
The index of the current sprite in the spritesheet.
Definition: EB_Animated.h:51
C_Vec2 spriteDimensions
The dimensions of the sprite in the spritesheet.
Definition: EB_Animated.h:49
virtual void animate(float dt)
A virtual function that animates the sprite.
Definition: EB_Animated.cpp:19
C_Vec2 dimensions
The dimensions of the Entity.
Definition: EB_Entity.h:94
Contains variables and functions to be inherited by classes that are about Entities.
Definition: EB_Entity.h:10
virtual void update(float dt)=0
A pure virtual function that updates the Entity.
~EB_Animated()
Destructs the Animated Entity object.
Definition: EB_Animated.cpp:10
Contains the Vec2 structure with functions and overloaded operators.
Definition: C_Vec2.h:7
EB_Animated(C_Texture *sprite, C_Vec2 pos, C_Vec2 dimensions, int animationFrames, C_Vec2 spriteDimensions, float animationLength, std::string iD, float *universalSpee)
Constructs the Animated Entity.
Definition: EB_Animated.cpp:3
C_Vec2 pos
The position of the Entity.
Definition: EB_Entity.h:92
C_Texture * sprite
A pointer to the Entity Texture.
Definition: EB_Entity.h:90
C_Timer animationTimer
The animation timer.
Definition: EB_Animated.h:53
void draw(SDL_Renderer *renderer)
Draws the StormCloud to the screen.
Definition: EB_Animated.cpp:14
Handles timer functions.
Definition: C_Timer.h:7
An Entity that uses a spritesheet for animation.
Definition: EB_Animated.h:11
std::string iD
The ID of the type of Entity.
Definition: EB_Entity.h:96
Creates a Texture for use with a renderer.
Definition: C_Texture.h:13
int animationFrames
The number of animation frames in the spritesheet.
Definition: EB_Animated.h:47