|
Pacman Torben Petré
|
#include <EntityModel.h>


Public Member Functions | |
| CollectibleEntityModel (float normalizedX, float normalizedY) | |
| Subclass of EntityModel to be used by collectible entities. | |
| virtual Events | collect ()=0 |
| Function that will be called when Pacman interacts with a collectible entity. Must handle this interaction. | |
| Public Member Functions inherited from logic::EntityModel | |
| EntityModel (float normalizedX, float normalizedY) | |
| Base class for entities. | |
| ~EntityModel () override=default | |
| float | getX () const |
| float | getY () const |
| Public Member Functions inherited from logic::Subject | |
| 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. | |
Additional Inherited Members | |
| Protected Attributes inherited from logic::EntityModel | |
| float | x |
| float | y |
| Protected Attributes inherited from logic::Subject | |
| std::list< std::weak_ptr< Observer > > | observers |
|
explicit |
Subclass of EntityModel to be used by collectible entities.
| normalizedX | Normalized initial X coordinate |
| normalizedY | Normalized initial Y coordinate |
|
nodiscardpure virtual |
Function that will be called when Pacman interacts with a collectible entity. Must handle this interaction.
Implemented in logic::CoinModel, and logic::FruitModel.