Peoplemon  0.1.0
Peoplemon 3 game source documentation
NewGame.hpp
Go to the documentation of this file.
1 #ifndef GAME_STATES_NEWGAME_HPP
2 #define GAME_STATES_NEWGAME_HPP
3 
4 #include <Core/Maps/Map.hpp>
5 #include <Game/States/State.hpp>
6 
7 namespace game
8 {
9 namespace state
10 {
18 class NewGame : public State {
19 public:
26  static bl::engine::State::Ptr create(core::system::Systems& systems);
27 
32  virtual ~NewGame() = default;
33 
38  virtual const char* name() const override;
39 
45  virtual void activate(bl::engine::Engine& engine) override;
46 
52  virtual void deactivate(bl::engine::Engine& engine) override;
53 
60  virtual void update(bl::engine::Engine& engine, float dt, float) override;
61 
62 private:
63  bl::rc::res::TextureRef bgndTxtr;
64  bl::rc::res::TextureRef profTxtr;
65  bl::gfx::Sprite background;
66  bl::gfx::Sprite prof;
67 
68  std::string playerName;
69  bool isBoy;
70 
71  bl::rc::rgi::FadeEffectTask* fadeout;
72 
74  void nameSet(const std::string& name);
75  void genderSet(const std::string& gender);
76  void fadeOut();
77 };
78 } // namespace state
79 } // namespace game
80 
81 #endif
Parent namespace for all functionality unique to the game.
Owns all primary systems and a reference to the engine.
Definition: Systems.hpp:47
This state does the game intro, gets the player's name and gender, and triggers the main game state i...
Definition: NewGame.hpp:18
virtual ~NewGame()=default
Destroy the New Game state.
virtual void activate(bl::engine::Engine &engine) override
Activates the state.
Definition: NewGame.cpp:28
virtual const char * name() const override
Returns "NewGame".
Definition: NewGame.cpp:26
virtual void deactivate(bl::engine::Engine &engine) override
Deactivates the state.
Definition: NewGame.cpp:85
static bl::engine::State::Ptr create(core::system::Systems &systems)
Creates the new game state.
Definition: NewGame.cpp:20
virtual void update(bl::engine::Engine &engine, float dt, float) override
Updates the state and menus and whatnot.
Definition: NewGame.cpp:98
Parent to all game states. Provides some commonly required data like core game systems.
Definition: State.hpp:29
core::system::Systems & systems
Definition: State.hpp:66