#include <Difficulty.h>
◆ Difficulty()
| logic::Difficulty::Difficulty |
( |
Difficulty & | other | ) |
|
|
delete |
Singletons should not be cloneable or assignable.
◆ getFlashesh()
| int Difficulty::getFlashesh |
( |
| ) |
const |
|
nodiscard |
Flashes determine how many warnings the player gets before frightened ghosts turn normal again.
Just like the frigthenedTime, this goes up and down between levels to catch the player of guard.
- Returns
- Amount of flashes
◆ getFrighenedGhostSpeed()
| float Difficulty::getFrighenedGhostSpeed |
( |
| ) |
const |
|
nodiscard |
The speed decrease of the ghosts varies on some levels.
- Returns
- Frightened Ghost Speed negative multiplier.
◆ getFrightenedTime()
| float Difficulty::getFrightenedTime |
( |
| ) |
const |
|
nodiscard |
This duration differs on every level and goes up and down.
By going up and down the player is slightly thrown of guard which makes timing things more difficult for the player.
- Returns
- How long ghosts are frightened
◆ getFruitPoints()
| int Difficulty::getFruitPoints |
( |
| ) |
const |
|
nodiscard |
◆ getFruitSpriteOffset()
| int Difficulty::getFruitSpriteOffset |
( |
| ) |
const |
|
nodiscard |
Retrieves the sprite sheet offset for the fruit associated with the current difficulty level.
- Returns
- Integer offset for the fruit sprite.
◆ getGhostSpeed()
| float Difficulty::getGhostSpeed |
( |
| ) |
const |
|
nodiscard |
The speed of the Ghosts is different on some levels.
- Returns
- Ghost Speed
◆ getInstance()
◆ getPacmanSpeed()
| float Difficulty::getPacmanSpeed |
( |
| ) |
const |
|
nodiscard |
The speed of Pacman is different on some levels.
- Returns
- Pacman speed
◆ increaseDifficulty()
| void Difficulty::increaseDifficulty |
( |
| ) |
|
Increases the difficulty for as long as it doesn't out~index the difficulty map. Reuses the final difficulty for anything beyond.
◆ operator=()
| void logic::Difficulty::operator= |
( |
const Difficulty & | | ) |
|
|
delete |
◆ reset()
| void Difficulty::reset |
( |
| ) |
|
Resets the difficulty back to 0.
The documentation for this class was generated from the following files: