Peoplemon  0.1.0
Peoplemon 3 game source documentation
Systems.cpp
Go to the documentation of this file.
2 
3 namespace core
4 {
5 namespace system
6 {
7 using namespace bl::engine;
8 
9 constexpr StateMask::V WorldVisible = StateMask::Running | StateMask::Paused;
10 
11 Systems::Systems(Engine& engine)
12 : _engine(engine)
13 , _clock(engine.systems().registerSystem<Clock>(FrameStage::Update0, StateMask::Running, *this))
14 , _ai(engine.systems().registerSystem<AI>(FrameStage::Update1, StateMask::Running, *this))
15 , _controllable(*this)
16 , _entity(*this)
17 , _player(engine.systems().registerSystem<Player>(FrameStage::Update0, StateMask::All, *this))
18 , _world(engine.systems().registerSystem<World>(FrameStage::Update0, WorldVisible, *this))
19 , _position(engine.systems().registerSystem<Position>(FrameStage::Update0, WorldVisible, *this))
20 , _movement(
21  engine.systems().registerSystem<Movement>(FrameStage::Update0, StateMask::Running, *this))
22 , _interaction(*this)
23 , _hud(engine.systems().registerSystem<HUD>(FrameStage::Update0, StateMask::All, *this))
24 , _scripts(*this)
25 , _trainers(
26  engine.systems().registerSystem<Trainers>(FrameStage::Update0, StateMask::Running, *this))
27 , _wildPeoplemon(*this)
28 , _flight(engine.systems().registerSystem<Flight>(FrameStage::Update0, StateMask::Running, *this))
29 , _render(engine.systems().registerSystem<Render>(FrameStage::Update2, WorldVisible, *this)) {
30  _interaction.init();
31  _scripts.init();
32  _wildPeoplemon.init();
33 }
34 
35 const bl::engine::Engine& Systems::engine() const { return _engine; }
36 
37 bl::engine::Engine& Systems::engine() { return _engine; }
38 
39 Clock& Systems::clock() { return _clock; }
40 
41 const Clock& Systems::clock() const { return _clock; }
42 
43 World& Systems::world() { return _world; }
44 
45 const World& Systems::world() const { return _world; }
46 
47 Position& Systems::position() { return _position; }
48 
49 const Position& Systems::position() const { return _position; }
50 
51 Movement& Systems::movement() { return _movement; }
52 
53 const Movement& Systems::movement() const { return _movement; }
54 
55 Entity& Systems::entity() { return _entity; }
56 
57 const Entity& Systems::entity() const { return _entity; }
58 
59 Player& Systems::player() { return _player; }
60 
61 const Player& Systems::player() const { return _player; }
62 
63 Controllable& Systems::controllable() { return _controllable; }
64 
65 AI& Systems::ai() { return _ai; }
66 
67 Interaction& Systems::interaction() { return _interaction; }
68 
69 HUD& Systems::hud() { return _hud; }
70 
71 Scripts& Systems::scripts() { return _scripts; }
72 
73 const Scripts& Systems::scripts() const { return _scripts; }
74 
75 Trainers& Systems::trainers() { return _trainers; }
76 
77 const Trainers& Systems::trainers() const { return _trainers; }
78 
79 WildPeoplemon& Systems::wildPeoplemon() { return _wildPeoplemon; }
80 
81 const WildPeoplemon& Systems::wildPeoplemon() const { return _wildPeoplemon; }
82 
83 Flight& Systems::flight() { return _flight; }
84 
85 const Flight& Systems::flight() const { return _flight; }
86 
87 Render& Systems::render() { return _render; }
88 
89 } // namespace system
90 } // namespace core
Core classes and functionality for both the editor and game.
constexpr StateMask::V WorldVisible
Definition: Systems.cpp:9
Manages NPC's and trainers and their behaviors.
Definition: AI.hpp:25
Simple time keeping systems. Tracks in game time and date based on real elapsed play time.
Definition: Clock.hpp:25
Simple systems for performing batch locks and unlocks on all controllable entities.
Basic helper system for creating entities and their required components. Also manages player data and...
Definition: Entity.hpp:27
Special system to manage player flight between their current location and a town.
Definition: Flight.hpp:21
The primary HUD system for the player. Manages displaying messages and asking questions....
Definition: HUD.hpp:31
The main interaction system. Manages interaction between entities. Handles item logic and NPC convers...
Definition: Interaction.hpp:27
Primary System for managing entity movement and interpolation.
Definition: Movement.hpp:21
Primary system for managing the player and their data.
Definition: Player.hpp:35
The primary entity positioning system. Handles determining which entities get updated as well as trac...
Definition: Position.hpp:30
Basic system that synchronizes animation states based on movement state events.
Definition: Render.hpp:22
System that stores and handles saving/loading of save entries for scripts.
Definition: Scripts.hpp:22
This system manages trainers. It handles their vision and makes them walk up to the player.
Definition: Trainers.hpp:32
Manages the appearances of wild peoplemon when walking through catch tiles.
System for managing the current map and previous maps.
Definition: World.hpp:23