Jamie Slowgrove - MGP Assignment 2 - JAM
 All Classes Namespaces Files Functions Variables Macros
Entity.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Texture.h"
4 #include "Vec2.h"
5 
11 {
12 private:
19 
20 public:
29  JAM_Entity(JAM_Texture* sprite, float x, float y, float width, float height);
30 
34  ~JAM_Entity();
35 
40  virtual void update(float dt) = 0;
41 
46  void draw(SDL_Renderer* renderer);
47 
53  void setPosition(float x, float y);
54 
59  void setPosition(JAM_Vec2 position);
60 
65  void setX(float x);
66 
71  void setY(float y);
72 
78  void setDimensions(float width, float height);
79 
84  void setDimensions(JAM_Vec2 dimensions);
85 
90  void setWidth(float width);
91 
96  void setHeight(float height);
97 
103 
109 };
~JAM_Entity()
Definition: Entity.cpp:17
void setX(float x)
Definition: Entity.cpp:51
JAM_Vec2 getDimensions()
Definition: Entity.cpp:114
void draw(SDL_Renderer *renderer)
Definition: Entity.cpp:24
JAM_Texture * sprite
Definition: Entity.h:14
Creates a Texture for use with a renderer. Creates a Texture from an image file, this can then be use...
Definition: Texture.h:13
JAM_Vec2 getPosition()
Definition: Entity.cpp:105
void setWidth(float width)
Definition: Entity.cpp:87
void setDimensions(float width, float height)
Definition: Entity.cpp:69
void setHeight(float height)
Definition: Entity.cpp:96
JAM_Vec2 dimensions
Definition: Entity.h:18
JAM_Entity(JAM_Texture *sprite, float x, float y, float width, float height)
Definition: Entity.cpp:6
void setPosition(float x, float y)
Definition: Entity.cpp:33
void setY(float y)
Definition: Entity.cpp:60
Creates an Entity object.
Definition: Entity.h:10
virtual void update(float dt)=0
Creates an Vec2 structure with functions. Creates an Vec2 structure with overloaded operators to crea...
Definition: Vec2.h:9
JAM_Vec2 position
Definition: Entity.h:16