// // Created by erik on 2018-07-02. // #ifndef CYPHESIS_SCRIPTSPROPERTY_H #define CYPHESIS_SCRIPTSPROPERTY_H #include "common/Property.h" #include "common/ScriptKit.h" #include #include /** * Specifies a list of scripts to be used by the entity. */ class ScriptsProperty : public Property { public: /** * Cache of script factories. */ static std::map, std::shared_ptr>> sScriptFactories; /** * Reloads all script factories (i.e. reload the scripts from disk). */ static void reloadAllScriptFactories(); void set(const Atlas::Message::Element &) override; void apply(LocatedEntity *) override; /** * Applies the scripts to the entity. */ void applyScripts(LocatedEntity * ) const; protected: std::vector>> m_scripts; }; #endif //CYPHESIS_SCRIPTSPROPERTY_H