Jamie Slowgrove - AI Assignment 1
Line of Sight & A* path-finding
 All Classes Namespaces Files Functions Variables
creature.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 #include "entity.h"
7 #include "map.h"
8 
13 class Creature : public Entity
14 {
15 protected:
19  int minX, maxX, minY, maxY;
20 
34  float collision(Map *, float, float, float, int, int, int, int, char);
35 
45  void displayCollisionTest(SDL_Renderer*, Map *, int, int, int, int);
46 
47 public:
58  Creature(Texture*, Vec2, Vec2, int, int, int, int);
59 
63  ~Creature();
64 
69  void updatePosition(float);
70 
75  void setVelocities(Vec2);
76 
82 
88  void displayTiles(SDL_Renderer*, Map*);
89 
95  void collisionUpdate(Map *, float);
96 
102  void collisionUpdate(Entity *, float);
103 };
Creates a Creature object that inherits Entity. Creates a Creature object that inherits Entity and co...
Definition: creature.h:13
float collision(Map *, float, float, float, int, int, int, int, char)
Definition: creature.cpp:170
Vec2 getVelocities()
Definition: creature.cpp:50
Creates a Vec2 structure with functions Creates a Vec2 structure with overloaded operators to create ...
Definition: vec2.h:7
Creature(Texture *, Vec2, Vec2, int, int, int, int)
Definition: creature.cpp:6
void updatePosition(float)
Definition: creature.cpp:26
int minX
Definition: creature.h:19
int minY
Definition: creature.h:19
~Creature()
Definition: creature.cpp:19
Creates an Entity object that contains the details for the Entity.
Definition: entity.h:10
Creates a Map object.
Definition: map.h:13
int maxY
Definition: creature.h:19
Creates a Texture for use with a renderer Creates a Texture from an image file, this can then be used...
Definition: texture.h:13
void collisionUpdate(Map *, float)
Definition: creature.cpp:143
int maxX
Definition: creature.h:19
void displayTiles(SDL_Renderer *, Map *)
Definition: creature.cpp:59
Vec2 velocities
Definition: creature.h:17
void setVelocities(Vec2)
Definition: creature.cpp:41
void displayCollisionTest(SDL_Renderer *, Map *, int, int, int, int)
Definition: creature.cpp:103