Sky Zone Omega - PC Version
 All Classes Namespaces Files Functions Variables Macros
EB_Velocity.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "EB_Entity.h"
4 #include "../../Core/C_Vec2.h"
5 
10 class EB_Velocity : public EB_Entity
11 {
12 public:
22  EB_Velocity(C_Texture* sprite, C_Vec2 pos, C_Vec2 dimensions, C_Vec2 velocities, std::string iD, float* universalSpee);
23 
27  ~EB_Velocity();
28 
33  virtual void update(float dt) = 0;
34 
39  void updatePosWithVelocities(float dt);
40 
45  void setVelocities(C_Vec2 velocity);
46 
52 
53 protected:
56 };
void updatePosWithVelocities(float dt)
Updates the position of the Entity using the velocities.
Definition: EB_Velocity.cpp:13
C_Vec2 dimensions
The dimensions of the Entity.
Definition: EB_Entity.h:94
An Entity that contains velocities.
Definition: EB_Velocity.h:10
Contains variables and functions to be inherited by classes that are about Entities.
Definition: EB_Entity.h:10
Contains the Vec2 structure with functions and overloaded operators.
Definition: C_Vec2.h:7
EB_Velocity(C_Texture *sprite, C_Vec2 pos, C_Vec2 dimensions, C_Vec2 velocities, std::string iD, float *universalSpee)
Constructs the Velocity Entity.
Definition: EB_Velocity.cpp:3
void setVelocities(C_Vec2 velocity)
Sets the velocities of the Entity.
Definition: EB_Velocity.cpp:19
virtual void update(float dt)=0
A pure virtual function that updates the Entity.
C_Vec2 velocities
The velocities of the Entity.
Definition: EB_Velocity.h:55
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
~EB_Velocity()
Destructs the Velocity Entity object.
Definition: EB_Velocity.cpp:9
C_Vec2 getVelocities()
Gets the velocities of the Entity.
Definition: EB_Velocity.cpp:24
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