Pacman  1.0
Pacman game
Fonctions membres publiques | Fonctions membres privées | Attributs privés | Liste de tous les membres
Référence de la classe Clyde

#include <Clyde.h>

Graphe d'héritage de Clyde:
Inheritance graph
[légende]
Graphe de collaboration de Clyde:
Collaboration graph
[légende]

Fonctions membres publiques

 Clyde (float x, float y, int direction, std::shared_ptr< Intersection > destination)
 
 ~Clyde ()
 
std::shared_ptr< IntersectiongetDestination ()
 
void setDestination (std::shared_ptr< Intersection > dest)
 
Tile getOrig ()
 
- Fonctions membres publiques hérités de Ghosts
 Ghosts (float x, float y, int direction, Tile target, int dotCounter)
 
 ~Ghosts ()
 
void move (int pacmanX, int pacmanY, std::shared_ptr< Intersection > dest, int dotEaten)
 move the ghost Plus de détails...
 
void render (int frame, SDL_Renderer *renderer, SDL_Texture *texture)
 render the ghost Plus de détails...
 
void setMode (int mode)
 
int getMode ()
 
- Fonctions membres publiques hérités de Entity
 Entity (float x, float y, int direction)
 
void setDirection (int d)
 
float getX () const
 
float getY () const
 

Fonctions membres privées

Tile getGoalTile (int pacmanX, int pacmanY)
 Get the Goal Tile object. Plus de détails...
 

Attributs privés

std::shared_ptr< Intersectiondest
 
Tile scatterTarget
 

Membres hérités additionnels

- Fonctions membres protégées hérités de Ghosts
SDL_Rect getSprite (int frame, int direction)
 
std::shared_ptr< IntersectionmakeTurn (int pacmanX, int pacmanY, std::shared_ptr< Intersection > dest)
 return the next intersection Plus de détails...
 
int oppositeDirection (int direction)
 
- Fonctions membres protégées hérités de Entity
bool isAtIntersection (std::shared_ptr< Intersection > dest)
 return wether the entity is at an intersection Plus de détails...
 
- Attributs protégés hérités de Ghosts
std::vector< SDL_Rect > sprites
 
int mode = SCATTER
 
int previousMode = SCATTER
 
Tile scatterTarget
 
std::mt19937 rng
 
Uint32 modeTimer = 0
 
int dotCounter
 
bool isFree = false
 
- Attributs protégés hérités de Entity
float x
 
float y
 
float speed
 
int direction
 
std::vector< SDL_Rect > sprites
 

Documentation des constructeurs et destructeur

◆ Clyde()

Clyde::Clyde ( float  x,
float  y,
int  direction,
std::shared_ptr< Intersection destination 
)

◆ ~Clyde()

Clyde::~Clyde ( )

Documentation des fonctions membres

◆ getDestination()

std::shared_ptr< Intersection > Clyde::getDestination ( )
virtual

Implémente Ghosts.

◆ getGoalTile()

Tile Clyde::getGoalTile ( int  pacmanX,
int  pacmanY 
)
privatevirtual

Get the Goal Tile object.

Clyde's goal tile is pacman's current tile if the distance between Clyde and Pacman is greater than 8 tiles. Otherwise, Clyde's goal tile is it's scatter target.

Paramètres
pacmanX
pacmanY
Renvoie
Tile

Implémente Ghosts.

◆ getOrig()

Tile Clyde::getOrig ( )
virtual

Implémente Ghosts.

◆ setDestination()

void Clyde::setDestination ( std::shared_ptr< Intersection dest)
virtual

Implémente Ghosts.

Documentation des données membres

◆ dest

std::shared_ptr<Intersection> Clyde::dest
private

◆ scatterTarget

Tile Clyde::scatterTarget
private

La documentation de cette classe a été générée à partir du fichier suivant :