Jamie Slowgrove - AI Assignment 1
Line of Sight & A* path-finding
 All Classes Namespaces Files Functions Variables
botAI.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 "creature.h"
7 #include "player.h"
8 #include "map.h"
9 #include "lineOfSight.h"
10 #include "aStar.h"
11 
16 class BotAI : public Creature
17 {
18 protected:
25  bool running;
26 
32  void updateMovementVelocities(float, bool);
33 
34 public:
46  BotAI(Texture*, Vec2, Vec2, int, int, int, int, Map*);
47 
51  ~BotAI();
52 
58  void playerLineOfSight(Player*, Map*);
59 
66  virtual void updateMovement(Player*, Map*, float);
67 
73  void drawPath(SDL_Renderer*, Vec2 target);
74 
80 
85  bool getRunning();
86 };
Creates a BotAI object that inherits Creature. Creates a BotAI object that inherits Creature and cont...
Definition: botAI.h:16
Creates a Creature object that inherits Entity. Creates a Creature object that inherits Entity and co...
Definition: creature.h:13
AStar * aStar
Definition: botAI.h:20
bool getRunning()
Definition: botAI.cpp:240
Creates a Vec2 structure with functions Creates a Vec2 structure with overloaded operators to create ...
Definition: vec2.h:7
void playerLineOfSight(Player *, Map *)
Definition: botAI.cpp:45
~BotAI()
Definition: botAI.cpp:38
Creates a Map object.
Definition: map.h:13
Vec2 moveTarget
Definition: botAI.h:21
Creates an object for A* path finding Made using help from http://www.policyalmanac.org/games/aStarTutorial.htm.
Definition: aStar.h:13
Creates a Texture for use with a renderer Creates a Texture from an image file, this can then be used...
Definition: texture.h:13
BotAI(Texture *, Vec2, Vec2, int, int, int, int, Map *)
Definition: botAI.cpp:6
void updateMovementVelocities(float, bool)
Definition: botAI.cpp:117
void drawPath(SDL_Renderer *, Vec2 target)
Definition: botAI.cpp:204
virtual void updateMovement(Player *, Map *, float)
Definition: botAI.cpp:69
bool running
Definition: botAI.h:25
Vec2 lastNode
Definition: botAI.h:23
Creates a Player object that inherits Creature. Creates a Player object that inherits Creature and co...
Definition: player.h:12
Vec2 getLastNodePosition()
Definition: botAI.cpp:231
Vec2 nextPosition
Definition: botAI.h:22