![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
The main interaction system. Manages interaction between entities. Handles item logic and NPC conversations followed by trainer battles if applicable. More...
#include <Interaction.hpp>
Public Member Functions | |
Interaction (Systems &owner) | |
Construct a new Interaction system. More... | |
void | init () |
Subscribes to the game event bus. More... | |
bool | interact (bl::ecs::Entity interactor) |
Performs an interation on behalf of the given entity. More... | |
bool | npcTalkedTo (const std::string &name) const |
Returns whether or not the given npc has been talked to. More... | |
bool | trainerTalkedto (const std::string &name) const |
Returns whether or not the given trainer has been talked to. More... | |
bool | flagSet (const std::string &flag) const |
Checks if the given conversation flag has been set. More... | |
void | setFlag (const std::string &flag) |
Sets the conversation flag. More... | |
Friends | |
struct | bl::serial::SerializableObject< Interaction > |
The main interaction system. Manages interaction between entities. Handles item logic and NPC conversations followed by trainer battles if applicable.
Definition at line 26 of file Interaction.hpp.
core::system::Interaction::Interaction | ( | Systems & | owner | ) |
Construct a new Interaction system.
owner | The primary Systems object |
Definition at line 27 of file Interaction.cpp.
bool core::system::Interaction::flagSet | ( | const std::string & | flag | ) | const |
Checks if the given conversation flag has been set.
flag | The name of the flag to check |
Definition at line 253 of file Interaction.cpp.
void core::system::Interaction::init | ( | ) |
Subscribes to the game event bus.
Definition at line 33 of file Interaction.cpp.
bool core::system::Interaction::interact | ( | bl::ecs::Entity | interactor | ) |
Performs an interation on behalf of the given entity.
interactor | The entity doing the interaction |
Definition at line 35 of file Interaction.cpp.
bool core::system::Interaction::npcTalkedTo | ( | const std::string & | name | ) | const |
Returns whether or not the given npc has been talked to.
name | The name of the NPC |
Definition at line 241 of file Interaction.cpp.
void core::system::Interaction::setFlag | ( | const std::string & | flag | ) |
Sets the conversation flag.
flag | The name of the flag to set |
Definition at line 255 of file Interaction.cpp.
bool core::system::Interaction::trainerTalkedto | ( | const std::string & | name | ) | const |
Returns whether or not the given trainer has been talked to.
name | The name of the trainer |
Definition at line 247 of file Interaction.cpp.
|
friend |
Definition at line 102 of file Interaction.hpp.