Peoplemon  0.1.0
Peoplemon 3 game source documentation
Maps.hpp
Go to the documentation of this file.
1 #ifndef CORE_EVENTS_MAPS_HPP
2 #define CORE_EVENTS_MAPS_HPP
3 
4 #include <string>
5 
6 namespace core
7 {
8 namespace map
9 {
10 class Map;
11 }
12 
13 namespace event
14 {
22 struct MapSwitch {
29  : map(map) {}
30 
32  const map::Map& map;
33 };
34 
41 struct MapEntered {
48  : map(map) {}
49 
51  const map::Map& map;
52 };
53 
60 struct MapExited {
67  : map(map) {}
68 
70  const map::Map& map;
71 };
72 
86  SwitchMapTriggered(const std::string& newMap, int spawn)
87  : newMap(newMap)
88  , spawn(spawn) {}
89 
91  const std::string newMap;
92 
94  const int spawn;
95 };
96 
97 } // namespace event
98 } // namespace core
99 
100 #endif
Core classes and functionality for both the editor and game.
Fired right before a map is entered. Use this event for initializing data structures that depend on m...
Definition: Maps.hpp:22
MapSwitch(const map::Map &map)
Construct a new MapSwitch event.
Definition: Maps.hpp:28
const map::Map & map
The map that is going to be entered.
Definition: Maps.hpp:32
Fired when a map is entered.
Definition: Maps.hpp:41
MapEntered(const map::Map &map)
Construct a new Map Entered object.
Definition: Maps.hpp:47
const map::Map & map
A reference to the map that was just entered.
Definition: Maps.hpp:51
Fired when a map is exited.
Definition: Maps.hpp:60
const map::Map & map
A reference to the map that was just exited.
Definition: Maps.hpp:70
MapExited(const map::Map &map)
Construct a new MapExited event.
Definition: Maps.hpp:66
Fired when the map should be switched to something else.
Definition: Maps.hpp:79
const std::string newMap
The new map to switch to.
Definition: Maps.hpp:91
const int spawn
The spawn to start the player at.
Definition: Maps.hpp:94
SwitchMapTriggered(const std::string &newMap, int spawn)
Construct a new Switch Map Triggered event.
Definition: Maps.hpp:86
The primary map class that represents a usable map in the game.
Definition: Map.hpp:49