Sky Zone Omega - PC Version
 All Classes Namespaces Files Functions Variables Macros
EB_Entity.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../../Core/C_Texture.h"
4 #include "../../Core/C_Vec2.h"
5 
10 class EB_Entity
11 {
12 public:
22 
26  ~EB_Entity();
27 
32  virtual void update(float dt) = 0;
33 
38  virtual void draw(SDL_Renderer* renderer);
39 
44  void setPosition(C_Vec2 pos);
45 
50  void setX(float x);
51 
56  void setY(float y);
57 
62  void setDimensions(C_Vec2 dimensions);
63 
68  void setWidth(float width);
69 
74  void setHeight(float height);
75 
81 
87 
88 protected:
96  std::string iD;
99 };
~EB_Entity()
Destructs the Entity object.
Definition: EB_Entity.cpp:9
void setPosition(C_Vec2 pos)
Sets the position of the Entity.
Definition: EB_Entity.cpp:19
void setX(float x)
Sets the x position of the Entity.
Definition: EB_Entity.cpp:24
C_Vec2 dimensions
The dimensions of the Entity.
Definition: EB_Entity.h:94
virtual void draw(SDL_Renderer *renderer)
A virtual function that draws the Entity to the screen.
Definition: EB_Entity.cpp:13
Contains variables and functions to be inherited by classes that are about Entities.
Definition: EB_Entity.h:10
void setHeight(float height)
Sets the height of the Entity.
Definition: EB_Entity.cpp:44
Contains the Vec2 structure with functions and overloaded operators.
Definition: C_Vec2.h:7
void setDimensions(C_Vec2 dimensions)
Sets the dimensions of the Entity.
Definition: EB_Entity.cpp:34
void setY(float y)
Sets the y position of the Entity.
Definition: EB_Entity.cpp:29
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_Entity(C_Texture *sprite, C_Vec2 pos, C_Vec2 dimensions, std::string iD, float *universalSpeed)
Constructs the Entity object.
Definition: EB_Entity.cpp:3
C_Vec2 getPosition()
Gets the position of the Entity.
Definition: EB_Entity.cpp:49
void setWidth(float width)
Sets the width of the Entity.
Definition: EB_Entity.cpp:39
float * universalSpeed
A pointer for the universal speed of the game.
Definition: EB_Entity.h:98
virtual void update(float dt)=0
A pure virtual function that updates the Entity.
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
C_Vec2 getDimensions()
Gets the dimensions of the Entity.
Definition: EB_Entity.cpp:54