4#include <unordered_map>
13 public std::enable_shared_from_this<LevelState> {
42 void handleInput(
const sf::Event::KeyEvent &keyPressed)
override;
53 void update(
double dt)
override;
72 std::shared_ptr<ConcreteFactory> factory;
73 std::shared_ptr<logic::Score> scoreSystem;
74 std::shared_ptr<SoundManager> soundManager;
75 std::shared_ptr<logic::World> world;
76 std::shared_ptr<WorldView> worldView;
81 std::unordered_map<Layer, std::vector<std::shared_ptr<EntityView>>> entityViews{
@ PACMAN
Definition ConcreteFactory.h:17
@ FOREGROUND
Definition ConcreteFactory.h:17
@ BACKGROUND
Definition ConcreteFactory.h:17
static std::shared_ptr< LevelState > create(StateManager &context)
Creates a LevelState which initiates a Pacman Level by setting up a logic::Word and rendering the gam...
Definition LevelState.cpp:47
LevelState(passkey, StateManager &context)
This State initiates a Pacman level by setting up a logic::World and rendering the game views.
Definition LevelState.cpp:13
void render() override
Renders all Views associated with this level. Does this on a layer basis.
Definition LevelState.cpp:122
void resized() override
Will resize the Game Views.
Definition LevelState.cpp:92
void update(double dt) override
Updates ScoreSystem and World.
Definition LevelState.cpp:97
void handleInput(const sf::Event::KeyEvent &keyPressed) override
Passes concrete Moves to the World instance & handles pausing.
Definition LevelState.cpp:55
State(StateManager &ctx)
Creates the base State object.
Definition StateManager.cpp:4
StateManager & context
Definition StateManager.h:54
Definition StateManager.h:96
Events
Definition Observer.h:14