#include <CoinModel.h>
|
| | CoinModel (float normalizedX, float normalizedY) |
| | Constructs a Coin model. Coins can be picked up by Pacman.
|
| Events | collect () override |
| | To be called when Pacman interacts with this Coin. Will notify its observers.
|
| | CollectibleEntityModel (float normalizedX, float normalizedY) |
| | Subclass of EntityModel to be used by collectible entities.
|
| | 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.
|
◆ CoinModel()
| CoinModel::CoinModel |
( |
float | normalizedX, |
|
|
float | normalizedY ) |
|
explicit |
Constructs a Coin model. Coins can be picked up by Pacman.
- Parameters
-
| normalizedX | Normalized X spawn coordinate |
| normalizedY | Normalized Y spawn coordinate |
◆ collect()
To be called when Pacman interacts with this Coin. Will notify its observers.
- Returns
- Event that the World should notify its Observers about.
Implements logic::CollectibleEntityModel.
The documentation for this class was generated from the following files: