Sky Zone Omega - PC Version
 All Classes Namespaces Files Functions Variables Macros
EB_VelocityAnimated.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "EB_Animated.h"
4 #include "../../Core/C_Vec2.h"
5 
11 {
12 public:
26  int animationFrames, C_Vec2 spriteDimensions, float animationLength, std::string iD, float* universalSpee);
27 
32 
37  virtual void update(float dt) = 0;
38 
43  void updatePosWithVelocities(float dt);
44 
49  void setVelocities(C_Vec2 velocity);
50 
56 
57 protected:
60 };
EB_VelocityAnimated(C_Texture *sprite, C_Vec2 pos, C_Vec2 dimensions, C_Vec2 velocities, int animationFrames, C_Vec2 spriteDimensions, float animationLength, std::string iD, float *universalSpee)
Constructs the Velocity Animated Entity.
Definition: EB_VelocityAnimated.cpp:3
C_Vec2 spriteDimensions
The dimensions of the sprite in the spritesheet.
Definition: EB_Animated.h:49
C_Vec2 getVelocities()
Gets the velocities of the Entity.
Definition: EB_VelocityAnimated.cpp:25
void updatePosWithVelocities(float dt)
Updates the position of the Entity using the velocities.
Definition: EB_VelocityAnimated.cpp:14
C_Vec2 dimensions
The dimensions of the Entity.
Definition: EB_Entity.h:94
~EB_VelocityAnimated()
Destructs the Velocity Animated Entity object.
Definition: EB_VelocityAnimated.cpp:10
Contains the Vec2 structure with functions and overloaded operators.
Definition: C_Vec2.h:7
void setVelocities(C_Vec2 velocity)
Sets the velocities of the Entity.
Definition: EB_VelocityAnimated.cpp:20
An Entity that contains velocities and uses a spritesheet for animation.
Definition: EB_VelocityAnimated.h:10
virtual void update(float dt)=0
A pure virtual function that updates the Entity.
C_Vec2 pos
The position of the Entity.
Definition: EB_Entity.h:92
C_Vec2 velocities
The velocities of the Entity.
Definition: EB_VelocityAnimated.h:59
C_Texture * sprite
A pointer to the Entity Texture.
Definition: EB_Entity.h:90
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