21 void Serialize(Json::Value& node,
bool load)
override;
39 void AddToPropertyMap(
const std::string& name,
int type,
int size,
void* data);
69 Json::Value Save()
const;
70 void Load(Json::Value& node);
80 Property(
int _typeID,
int _size,
void* _data) {
84 memcpy(data, _data, size);
97 std::map<std::string, Property*> propertyMap;
Component controlled by a script.
Definition: Script.hpp:13
void AddToPropertyMap(const std::string &name, int type, int size, void *data)
Add a property to the propertyMap.
Definition: Script.cpp:34
Script()
Create new script.
Definition: Script.cpp:14
void ClearPropertyMap()
Clears the property map.
Definition: Script.cpp:52
void * GetDataFromPropertyMap(const std::string &name)
Get the pointer to the data of a property in the map.
Definition: Script.cpp:43
~Script() final
Destructor.
Definition: Script.cpp:16
asIScriptObject * instance
The instance of the script class.
Definition: Script.hpp:30
void CopyDataFromPropertyMap(const std::string &name, void *target)
Copy the data from a property in the map.
Definition: Script.cpp:39
bool IsInPropertyMap(const std::string &name, const int type)
Is the property in the map?
Definition: Script.cpp:47
ScriptFile * scriptFile
The script file.
Definition: Script.hpp:27
void Serialize(Json::Value &node, bool load) override
Save or load component values to/from JSON.
Definition: Script.cpp:26
bool initialized
Whether the script component has been initialized.
Definition: Script.hpp:24
Component which all components inherit.
Definition: SuperComponent.hpp:9
Information about a file containing a script.
Definition: ScriptFile.hpp:8
Definition: BoxShapeEditor.hpp:5