Peoplemon  0.1.0
Peoplemon 3 game source documentation
MapEventContext.hpp
Go to the documentation of this file.
1 #ifndef CORE_SCRIPTS_MAPEVENTCONTEXT_HPP
2 #define CORE_SCRIPTS_MAPEVENTCONTEXT_HPP
3 
4 #include <BLIB/ECS.hpp>
5 #include <BLIB/Scripts.hpp>
6 #include <BLIB/Tilemap/Position.hpp>
7 #include <Core/Maps/Event.hpp>
8 
9 namespace core
10 {
11 namespace system
12 {
13 class Systems;
14 }
15 
16 namespace script
17 {
24 class MapEventContext : public bl::script::Context {
25 public:
34  MapEventContext(system::Systems& systems, bl::ecs::Entity entity, const map::Event& event,
35  const bl::tmap::Position& tile);
36 
37 protected:
38  virtual void addCustomSymbols(bl::script::SymbolTable& table) const override;
39 
40 private:
41  system::Systems& systems;
42  const bl::ecs::Entity entity;
43  const map::Event event;
44  const bl::tmap::Position tile;
45 };
46 
47 } // namespace script
48 } // namespace core
49 
50 #endif
Core classes and functionality for both the editor and game.
Represents an event in a Map. A script that is run on a trigger within a given region.
Definition: Event.hpp:19
Special script context for map events. Adds default built-ins and the map event built-ins.
MapEventContext(system::Systems &systems, bl::ecs::Entity entity, const map::Event &event, const bl::tmap::Position &tile)
Construct a new MapEventContext.
virtual void addCustomSymbols(bl::script::SymbolTable &table) const override
Owns all primary systems and a reference to the engine.
Definition: Systems.hpp:47