#include <WallModel.h>
|
| | WallModel (float normalizedX, float normalizedY, bool isDoor) |
| | Constructs a WallModel instance.
|
| bool | isDoor () const |
| | Returns whether this wall piece is a door. Doors are walls that can be passed through by ghosts under certain conditions.
|
| | 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.
|
◆ WallModel()
| WallModel::WallModel |
( |
float | normalizedX, |
|
|
float | normalizedY, |
|
|
bool | isDoor ) |
|
explicit |
Constructs a WallModel instance.
Walls are static entities and outside of being used for collission detetcion don't really do anything.
- Parameters
-
| normalizedX | Normalized x coordinate |
| normalizedY | Normalized y coordinate |
| isDoor | Whether this Wall may be considered a door under specific conditions. |
◆ isDoor()
| bool logic::WallModel::isDoor |
( |
| ) |
const |
|
inlinenodiscard |
Returns whether this wall piece is a door. Doors are walls that can be passed through by ghosts under certain conditions.
Doors act like a wall for Pacman and generally aswell for Ghosts. I added them for the functionality of the Ghost box. Ghosts spawn in this box and must leave it before they can target Pacman. While Ghosts are in this "leaving" state they may consider walls that are doors as non-existant/regular passage ways. Once they are outside the Ghost box they will start chasing Pacman, meaning they no longer consider door wall pieces as passthrough. Pacman never considers them as passthrough.
- Returns
- Whether this wall is a door
The documentation for this class was generated from the following files: