Interface for creating game entities.
More...
#include <AbstractFactory.h>
|
| virtual | ~AbstractFactory ()=default |
| virtual std::shared_ptr< PacmanModel > | createPacMan (float x, float y, float mapWidth, float mapHeight)=0 |
| | Creates a Pacman entity.
|
| virtual std::shared_ptr< ChasingGhost > | createBlinky (float x, float y, float mapWidth, float mapHeight)=0 |
| | Creates a ChasingGhost entity (Blinky's chasing personality).
|
| virtual std::shared_ptr< AmbushGhost > | createPinky (float x, float y, float mapWidth, float mapHeight)=0 |
| | Creates a AmbushGhost entity (Pinky's chasing personality).
|
| virtual std::shared_ptr< AmbushGhost > | createInky (float x, float y, float mapWidth, float mapHeight)=0 |
| | Creates a AmbushGhost entity (Inky's chasing personality).
|
| virtual std::shared_ptr< RandomGhost > | createClyde (float x, float y, float mapWidth, float mapHeight)=0 |
| | Creates a RandomGhost entity (Clyde's chasing personality).
|
| virtual std::shared_ptr< WallModel > | createWall (float x, float y, char type)=0 |
| | Creates a Wall entity.
|
| virtual std::shared_ptr< CoinModel > | createCoin (float x, float y)=0 |
| | Creates a Coin entity.
|
| virtual std::shared_ptr< FruitModel > | createFruit (float x, float y)=0 |
| | Creates a Fruit entity.
|
Interface for creating game entities.
Defines the contract that allows the World to create entities without depending on graphical implementations.
◆ ~AbstractFactory()
| virtual logic::AbstractFactory::~AbstractFactory |
( |
| ) |
|
|
virtualdefault |
◆ createBlinky()
| virtual std::shared_ptr< ChasingGhost > logic::AbstractFactory::createBlinky |
( |
float | x, |
|
|
float | y, |
|
|
float | mapWidth, |
|
|
float | mapHeight ) |
|
pure virtual |
Creates a ChasingGhost entity (Blinky's chasing personality).
- Parameters
-
| x | Normalized initial x position |
| y | Normalized initial y position |
| mapWidth | Amount of horizontal tiles |
| mapHeight | Amount of vertical tiles |
- Returns
- A shared pointer to the ChasingGhost.
Implemented in ConcreteFactory.
◆ createClyde()
| virtual std::shared_ptr< RandomGhost > logic::AbstractFactory::createClyde |
( |
float | x, |
|
|
float | y, |
|
|
float | mapWidth, |
|
|
float | mapHeight ) |
|
pure virtual |
Creates a RandomGhost entity (Clyde's chasing personality).
- Parameters
-
| x | Normalized initial x position |
| y | Normalized initial y position |
| mapWidth | Amount of horizontal tiles |
| mapHeight | Amount of vertical tiles |
- Returns
- A shared pointer to the RandomGhost.
Implemented in ConcreteFactory.
◆ createCoin()
| virtual std::shared_ptr< CoinModel > logic::AbstractFactory::createCoin |
( |
float | x, |
|
|
float | y ) |
|
pure virtual |
Creates a Coin entity.
- Parameters
-
| x | Normalized initial x position |
| y | Normalized initial y position |
- Returns
- A shared pointer to the Coin.
Implemented in ConcreteFactory.
◆ createFruit()
| virtual std::shared_ptr< FruitModel > logic::AbstractFactory::createFruit |
( |
float | x, |
|
|
float | y ) |
|
pure virtual |
Creates a Fruit entity.
- Parameters
-
| x | Normalized initial x position |
| y | Normalized initial y position |
- Returns
- A shared pointer to the Fruit.
Implemented in ConcreteFactory.
◆ createInky()
| virtual std::shared_ptr< AmbushGhost > logic::AbstractFactory::createInky |
( |
float | x, |
|
|
float | y, |
|
|
float | mapWidth, |
|
|
float | mapHeight ) |
|
pure virtual |
Creates a AmbushGhost entity (Inky's chasing personality).
- Parameters
-
| x | Normalized initial x position |
| y | Normalized initial y position |
| mapWidth | Amount of horizontal tiles |
| mapHeight | Amount of vertical tiles |
- Returns
- A shared pointer to the AmbushGhost.
Implemented in ConcreteFactory.
◆ createPacMan()
| virtual std::shared_ptr< PacmanModel > logic::AbstractFactory::createPacMan |
( |
float | x, |
|
|
float | y, |
|
|
float | mapWidth, |
|
|
float | mapHeight ) |
|
pure virtual |
Creates a Pacman entity.
- Parameters
-
| x | Normalized initial x position |
| y | Normalized initial y position |
| mapWidth | Amount of horizontal tiles |
| mapHeight | Amount of vertical tiles |
- Returns
- A shared pointer to the PacmanModel.
Implemented in ConcreteFactory.
◆ createPinky()
| virtual std::shared_ptr< AmbushGhost > logic::AbstractFactory::createPinky |
( |
float | x, |
|
|
float | y, |
|
|
float | mapWidth, |
|
|
float | mapHeight ) |
|
pure virtual |
Creates a AmbushGhost entity (Pinky's chasing personality).
- Parameters
-
| x | Normalized initial x position |
| y | Normalized initial y position |
| mapWidth | Amount of horizontal tiles |
| mapHeight | Amount of vertical tiles |
- Returns
- A shared pointer to the AmbushGhost.
Implemented in ConcreteFactory.
◆ createWall()
| virtual std::shared_ptr< WallModel > logic::AbstractFactory::createWall |
( |
float | x, |
|
|
float | y, |
|
|
char | type ) |
|
pure virtual |
Creates a Wall entity.
- Parameters
-
| 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 |
- Returns
- A shared pointer to the Wall.
Implemented in ConcreteFactory.
The documentation for this class was generated from the following file: