|
| | AmbushGhost (float normalizedX, float normalizedY, float mapWidth, float mapHeight, double cooldown) |
| | Initializes base class GhostModel. AmbushGhost has specific chasing behaviour.
|
| | GhostModel (float normalizedX, float normalizedY, float mapWidth, float mapHeight, double cooldown) |
| | Base class for Ghosts. Handles Ghost state and how that influences ghost behaviour.
|
| | ~GhostModel () override=default |
| GhostState | getState () const |
| | Returns the current state of the Ghost.
|
| bool | isFrightened () const |
| | Returns whether the Ghost is currently frightened.
|
| int | getGridSpawnX () const |
| | Returns the Grid mapped X coordinate of where the Ghost spawned.
|
| int | getGridSpawnY () const |
| | Returns the Grid mapped Y coordinate of where the Ghost spawned.
|
| void | setFrightened (bool frightened, const World &world) |
| | Allows the World to set toggle whether the Ghost is Frigthened or not.
|
| void | pacmanCollides (World &world) |
| | Tells the Ghost it collided with Pacman and should handle this situation.
|
| void | move (const World &world, float dt) override |
| | This function is to be called in the World update loop. The Ghost will act based on it's current State and possibly move.
|
| void | respawn () override |
| | Tell the Ghost to respawn. It will go back to its spawnpoint and start in a GhostState::WAITING state again.
|
| | MovingEntityModel (float normalizedX, float normalizedY, float mapWidth, float mapHeight, float speed) |
| | Subclass of EntityModel to be used for any moving entity.
|
| Moves | getDirection () const |
| | Get the direction the entity is currently moving in.
|
| int | getGridX () const |
| int | getGridY () const |
| | EntityModel (float normalizedX, float normalizedY) |
| | Base class for entities.
|
| | ~EntityModel () override=default |
| float | getX () const |
| float | getY () const |
| virtual | ~Subject ()=default |
| void | attach (const std::shared_ptr< Observer > &observer) |
| | Attaches an observer to this Subject.
|
| void | notify (Events event) |
| | Call the Observer update function with the provided event.
|