Creates a BotAI object that inherits Creature. Creates a BotAI object that inherits Creature and contains the details for the BotAI.
More...
#include <botAI.h>
|
| | BotAI (Texture *, Vec2, Vec2, int, int, int, int, Map *) |
| |
| | ~BotAI () |
| |
| void | playerLineOfSight (Player *, Map *) |
| |
| virtual void | updateMovement (Player *, Map *, float) |
| |
| void | drawPath (SDL_Renderer *, Vec2 target) |
| |
| Vec2 | getLastNodePosition () |
| |
| bool | getRunning () |
| |
| | Creature (Texture *, Vec2, Vec2, int, int, int, int) |
| |
| | ~Creature () |
| |
| void | updatePosition (float) |
| |
| void | setVelocities (Vec2) |
| |
| Vec2 | getVelocities () |
| |
| void | displayTiles (SDL_Renderer *, Map *) |
| |
| void | collisionUpdate (Map *, float) |
| |
| void | collisionUpdate (Entity *, float) |
| |
| | Entity (Texture *, Vec2, Vec2, int, int, int, int) |
| |
| | ~Entity () |
| |
| void | display (SDL_Renderer *) |
| |
| void | setPosition (Vec2) |
| |
| Vec2 | getPosition () |
| |
| int | getWidth () |
| |
| int | getHeight () |
| |
|
| void | updateMovementVelocities (float, bool) |
| |
| float | collision (Map *, float, float, float, int, int, int, int, char) |
| |
| void | displayCollisionTest (SDL_Renderer *, Map *, int, int, int, int) |
| |
Creates a BotAI object that inherits Creature. Creates a BotAI object that inherits Creature and contains the details for the BotAI.
| BotAI::BotAI |
( |
Texture * |
inTexture, |
|
|
Vec2 |
inPos, |
|
|
Vec2 |
inSource, |
|
|
int |
inSpriteW, |
|
|
int |
inSpriteH, |
|
|
int |
w, |
|
|
int |
h, |
|
|
Map * |
map |
|
) |
| |
Constructs a BotAI object
- Parameters
-
| Texture | * A pointer to the Texture |
| Vec2 | The position of the BotAI |
| Vec2 | The position of the sprite |
| int | The sprite width |
| int | The sprite height |
| int | The BotAI width |
| int | The BotAI height |
| Map | * A pointer to the map |
Destructs the BotAI object
| void BotAI::drawPath |
( |
SDL_Renderer * |
renderer, |
|
|
Vec2 |
target |
|
) |
| |
Draw the path of the BotAI from the target
- Parameters
-
| SDL_Renderer | * A pointer to the renderer |
| Vec2 | The position of the target |
| Vec2 BotAI::getLastNodePosition |
( |
| ) |
|
Getter # Get the last target node
- Returns
- Vec2 The last nodes position
| bool BotAI::getRunning |
( |
| ) |
|
Getter # Get the value of running
- Returns
- bool The value of running
| void BotAI::playerLineOfSight |
( |
Player * |
player, |
|
|
Map * |
map |
|
) |
| |
Virtual # Test if the player is in sight
- Parameters
-
| Player | * A pointer to the player |
| Map | * A pointer to the map |
| void BotAI::updateMovement |
( |
Player * |
player, |
|
|
Map * |
map, |
|
|
float |
dt |
|
) |
| |
|
virtual |
Virtual # Update the next movement of the BotAI
- Parameters
-
| Player | * A pointer to the Player |
| Map | * A pointer to the map |
| float | The delta time |
Reimplemented in BotB.
| void BotAI::updateMovementVelocities |
( |
float |
dt, |
|
|
bool |
check |
|
) |
| |
|
protected |
Update the movement velocities of the BotAI
- Parameters
-
| float | The delta time |
| bool | The test boolean |
If the BotAI is currently running
The documentation for this class was generated from the following files: