Jamie Slowgrove - AI Assignment 1
Line of Sight & A* path-finding
 All Classes Namespaces Files Functions Variables
entity.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include "texture.h"
5 #include "vec2.h"
6 
10 class Entity
11 {
12 protected:
20  int width, height;
23 public:
34  Entity(Texture*, Vec2, Vec2, int, int, int, int);
35 
39  ~Entity();
40 
45  void display(SDL_Renderer*);
46 
51  void setPosition(Vec2);
52 
57  Vec2 getPosition();
58 
63  int getWidth();
64 
69  int getHeight();
70 };
void setPosition(Vec2)
Definition: entity.cpp:38
int spriteWidth
Definition: entity.h:18
Creates a Vec2 structure with functions Creates a Vec2 structure with overloaded operators to create ...
Definition: vec2.h:7
int height
Definition: entity.h:20
int getWidth()
Definition: entity.cpp:56
Creates an Entity object that contains the details for the Entity.
Definition: entity.h:10
Vec2 position
Definition: entity.h:14
int width
Definition: entity.h:20
int spriteHeight
Definition: entity.h:18
int getHeight()
Definition: entity.cpp:65
Creates a Texture for use with a renderer Creates a Texture from an image file, this can then be used...
Definition: texture.h:13
Entity(Texture *, Vec2, Vec2, int, int, int, int)
Definition: entity.cpp:6
~Entity()
Definition: entity.cpp:21
void display(SDL_Renderer *)
Definition: entity.cpp:28
Vec2 source
Definition: entity.h:16
Texture * texture
Definition: entity.h:22
Vec2 getPosition()
Definition: entity.cpp:47