Peoplemon  0.1.0
Peoplemon 3 game source documentation
ConversationContext.hpp
Go to the documentation of this file.
1 #ifndef CORE_SCRIPTS_CONVERSATIONCONTEXT_HPP
2 #define CORE_SCRIPTS_CONVERSATIONCONTEXT_HPP
3 
4 #include <BLIB/ECS/Entity.hpp>
5 #include <BLIB/Scripts.hpp>
6 
7 namespace core
8 {
9 namespace system
10 {
11 class Systems;
12 }
13 
14 namespace script
15 {
23 class ConversationContext : public bl::script::Context {
24 public:
32  using StatusCb = std::function<bool(bl::ecs::Entity)>;
33 
41  ConversationContext(system::Systems& systems, bl::ecs::Entity entity, const StatusCb& cb);
42 
43 protected:
44  virtual void addCustomSymbols(bl::script::SymbolTable& table) const override;
45 
46 private:
47  system::Systems& systems;
48  const StatusCb cb;
49  const bl::ecs::Entity owner;
50 };
51 
52 } // namespace script
53 } // namespace core
54 
55 #endif
Core classes and functionality for both the editor and game.
Special script context for conversation scripts. Adds the default Peoplemon built-ins and the convers...
virtual void addCustomSymbols(bl::script::SymbolTable &table) const override
std::function< bool(bl::ecs::Entity)> StatusCb
Special callback type for reporting conversation state.
ConversationContext(system::Systems &systems, bl::ecs::Entity entity, const StatusCb &cb)
Construct a new ConversationContext.
Owns all primary systems and a reference to the engine.
Definition: Systems.hpp:47