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


Public Member Functions | |
| ConcreteFactory (std::unordered_map< Layer, std::vector< std::shared_ptr< EntityView > > > &views) | |
| Creates a ConreteFactory that can be passed to the World. Requires a views container from LevelState to append to. | |
| std::shared_ptr< logic::PacmanModel > | createPacMan (float x, float y, float mapWidth, float mapHeight) override |
| Creates a PacmanModel and View. | |
| std::shared_ptr< logic::ChasingGhost > | createBlinky (float x, float y, float mapWidth, float mapHeight) override |
| Creates a ChasingGhost and a normal GhostView (no distinction is made between GhostViews). | |
| std::shared_ptr< logic::AmbushGhost > | createPinky (float x, float y, float mapWidth, float mapHeight) override |
| Creates an AmbushGhost and a normal GhostView (no distinction is made between GhostViews). | |
| std::shared_ptr< logic::AmbushGhost > | createInky (float x, float y, float mapWidth, float mapHeight) override |
| Creates an AmbushGhost and a normal GhostView (no distinction is made between GhostViews). | |
| std::shared_ptr< logic::RandomGhost > | createClyde (float x, float y, float mapWidth, float mapHeight) override |
| Creates a RandomGhost and a normal GhostView (no distinction is made between GhostViews). | |
| std::shared_ptr< logic::WallModel > | createWall (float x, float y, char type) override |
| Creates WallModel and View. | |
| std::shared_ptr< logic::CoinModel > | createCoin (float x, float y) override |
| Creates CoinModel and View. | |
| std::shared_ptr< logic::FruitModel > | createFruit (float x, float y) override |
| Creates FruitModel and View. | |
| Public Member Functions inherited from logic::AbstractFactory | |
| virtual | ~AbstractFactory ()=default |
|
explicit |
Creates a ConreteFactory that can be passed to the World. Requires a views container from LevelState to append to.
| views | LevelState views container |
|
overridevirtual |
Creates a ChasingGhost and a normal GhostView (no distinction is made between GhostViews).
The View will be attached as an observer to the Model. The view will also be appended to the FOREGROUND layer in the LevelState views container.
| x | Normalized initial x position |
| y | Normalized initial y position |
| mapWidth | Amount of horizontal tiles |
| mapHeight | Amount of vertical tiles |
Implements logic::AbstractFactory.
|
overridevirtual |
Creates a RandomGhost and a normal GhostView (no distinction is made between GhostViews).
The View will be attached as an observer to the Model. The view will also be appended to the FOREGROUND layer in the LevelState views container.
| x | Normalized initial x position |
| y | Normalized initial y position |
| mapWidth | Amount of horizontal tiles |
| mapHeight | Amount of vertical tiles |
Implements logic::AbstractFactory.
|
overridevirtual |
Creates CoinModel and View.
The View will be attached as an observer to the Model. The view will also be appended to the BACKGROUND layer in the LevelState views container.
| x | Normalized initial x position |
| y | Normalized initial y position |
Implements logic::AbstractFactory.
|
overridevirtual |
Creates FruitModel and View.
The View will be attached as an observer to the Model. The view will also be appended to the BACKGROUND layer in the LevelState views container.
| x | Normalized initial x position |
| y | Normalized initial y position |
Implements logic::AbstractFactory.
|
overridevirtual |
Creates an AmbushGhost and a normal GhostView (no distinction is made between GhostViews).
The View will be attached as an observer to the Model. The view will also be appended to the FOREGROUND layer in the LevelState views container.
| x | Normalized initial x position |
| y | Normalized initial y position |
| mapWidth | Amount of horizontal tiles |
| mapHeight | Amount of vertical tiles |
Implements logic::AbstractFactory.
|
overridevirtual |
Creates a PacmanModel and View.
The View will be attached as an observer to the Model. The view will also be appended to the PACMAN layer in the LevelState views container.
| x | Initial x position |
| y | Initial y position |
| mapWidth | Amount of horizontal tiles |
| mapHeight | Amount of vertical tiles |
Implements logic::AbstractFactory.
|
overridevirtual |
Creates an AmbushGhost and a normal GhostView (no distinction is made between GhostViews).
The View will be attached as an observer to the Model. The view will also be appended to the FOREGROUND layer in the LevelState views container.
| x | Normalized initial x position |
| y | Normalized initial y position |
| mapWidth | Amount of horizontal tiles |
| mapHeight | Amount of vertical tiles |
Implements logic::AbstractFactory.
|
overridevirtual |
Creates WallModel and View.
The View will be attached as an observer to the Model. The view will also be appended to the BACKGROUND layer in the LevelState views container.
| x | Normalized initial x position |
| y | Normalized initial y position |
| type | Used by to determine the sprite of the view and whether the model is a door |
Implements logic::AbstractFactory.