|
| enum | EStates : uint8_t {
IDLE = 0,
AERIAL,
PATROLLING,
CURIOUS,
ALERT
} |
| |
|
|
| Enemy (const double x_, const double y_, Sprite *const sprite_, const bool patrol_, const double patrolLength_) |
| | The constructor.
|
| |
|
virtual | ~Enemy () |
| | The destructor.
|
| |
| virtual void | update (const double dt_) |
| | Updates the player. More...
|
| |
| virtual void | render (const double cameraX_, const double cameraY_) |
| | Renders the player. More...
|
| |
|
void | initializeStates () |
| |
|
void | destroyStates () |
| |
|
void | changeState (const EStates state_) |
| |
| | DynamicEntity (const double x_, const double y_, Sprite *const sprite_) |
| | The constructor. More...
|
| |
|
virtual | ~DynamicEntity () |
| | The destructor.
|
| |
|
virtual void | jump () |
| |
|
virtual void | applyGravity () |
| |
|
virtual void | move (const bool movingLeft_, const bool movingRight_) |
| |
|
virtual void | slowVx () |
| |
|
virtual void | roll () |
| |
|
virtual void | aim (Crosshair *const crosshair, double direction) |
| |
|
virtual void | useBombPotion (BombPotion *const bombPotion, const int strength, const int distance) |
| |
| virtual void | setLevelWH (const unsigned int width_, const unsigned int height_) |
| |
|
virtual void | setCollisionRects (const std::vector< SDL_Rect > &collisionRects_) |
| |
|
virtual | ~Entity () |
| | The destructor.
|
| |
| unsigned int | getWidth () |
| |
| unsigned int | getHeight () |
| |
| SDL_Rect & | getAnimationClip () |
| |
|
|
double | patrolX |
| |
|
bool | left |
| |
|
double | originalX |
| |
|
bool | patrol |
| |
|
double | patrolLength |
| |
| double | vx |
| | The dynamic entity's speed on the x axis. More...
|
| |
| double | vy |
| | The dynamic entity's speed on the x axis. More...
|
| |
| double | speed |
| | Speed that moves dynamic entity on input. More...
|
| |
| double | maxSpeed |
| | Dynamic entity max speed. More...
|
| |
| bool | isGrounded |
| | Check for if the dynamic entity is on the ground. More...
|
| |
| double | x |
| | The position in the x axis. More...
|
| |
| double | y |
| | The position in the y axis. More...
|
| |
| bool | isRight |
| | The direction in the x axis. More...
|
| |
|
|
static double | px = 0.0 |
| |
|
static double | py = 0.0 |
| |
|
static double | alertRange = 300.0 |
| |
|
static double | curiousRange = 600.0 |
| |
|
|
virtual void | handleCollision (std::array< bool, CollisionSide::SOLID_TOTAL > detections_) |
| | Handles the collision.
|
| |
|
| virtual void | updatePosition (const double dt_) |
| | Updates the position of the dynamic entity Update is based on what input was recieved, and the players velocity. More...
|
| |
std::array< bool,
CollisionSide::SOLID_TOTAL > | detectCollision () |
| |
| unsigned int | levelW |
| | The width of the level. More...
|
| |
| unsigned int | levelH |
| | The height of the level. More...
|
| |
| std::vector< SDL_Rect > | collisionRects |
| | The SDL_Rects containing collidable tiles
positions. More...
|
| |
| void Enemy::render |
( |
const double |
cameraX_, |
|
|
const double |
cameraY_ |
|
) |
| |
|
virtual |
Renders the player.
Uses the player's sprite render method.
- See Also
- Sprite::render
- Parameters
-
| cameraX_ | : The x position of the camera. |
| cameraY_ | : The y position of the camera. |
Implements Entity.
| void Enemy::update |
( |
const double |
dt_) | |
|
|
virtual |
Updates the player.
- See Also
- Player::updateInput, Player::updatePosition
- Parameters
-
| dt_ | : Delta time. Time elapsed between one frame and the other, independent of processing speed. |
Implements Entity.
The documentation for this class was generated from the following files:
- /home/caio/Git/Dauphine/include/Enemy.h
- /home/caio/Git/Dauphine/src/Enemy.cpp