#pragma once #include "game/game.hpp" namespace game { namespace scripting { class context; class event_listener_handle; class entity final { public: entity(); entity(const entity& other); entity(context* context, unsigned int entity_id); ~entity(); event_listener_handle on_notify(const std::string& event, const std::function&)>& callback, bool is_volatile) const; unsigned int get_entity_id() const; game::native::scr_entref_t get_entity_reference() const; chaiscript::Boxed_Value call(const std::string& function, const std::vector& arguments) const; void notify(const std::string& event, const std::vector& arguments) const; void set(const std::string& field, const chaiscript::Boxed_Value& value) const; chaiscript::Boxed_Value get(const std::string& field) const; private: context* context_; unsigned int entity_id_; }; } }