7 #ifndef CAFU_GAMESYS_COMPONENT_SCRIPT_HPP_INCLUDED
8 #define CAFU_GAMESYS_COMPONENT_SCRIPT_HPP_INCLUDED
10 #include "CompBase.hpp"
50 const char*
GetName()
const {
return "Script"; }
64 static int InitEventTypes(lua_State* LuaState);
65 static int PostEvent(lua_State* LuaState);
66 static int DamageAll(lua_State* LuaState);
67 static int toString(lua_State* LuaState);
70 static const char* DocClass;
80 void DoServerFrame(
float t) ;
unsigned int GetEditorColor() const
Returns a color that the Map Editor can use to render the representation of this component's entity...
Definition: CompScript.hpp:51
void OnPostLoad(bool OnlyStatic)
This method is called after all entities and their components have been loaded.
Definition: CompScript.cpp:91
This class is used for reading data from a StateT instance (deserialization).
Definition: State.hpp:207
static const luaL_Reg MethodsList[]
The list of Lua methods for this class.
Definition: CompScript.hpp:69
const char * GetName() const
Returns the name of this component.
Definition: CompScript.hpp:50
This class is used for writing data into a StateT instance (serialization).
Definition: State.hpp:81
ComponentScriptT()
The constructor.
Definition: CompScript.cpp:52
Definition: TypeSys.hpp:52
Definition: TypeSys.hpp:57
This class keeps type information (about an entity class that occurs in the game).
Definition: TypeSys.hpp:79
This component runs custom Lua script code, implementing the behaviour of the entity in the game worl...
Definition: CompScript.hpp:26
ComponentScriptT * Clone() const
The virtual copy constructor.
Definition: CompScript.cpp:85
Definition: TypeSys.hpp:68
This is the base class for the components that an entity is composed/aggregated of.
Definition: CompBase.hpp:54
void PostEvent(unsigned int EventType)
This function is used for posting an event of the given type.
Definition: CompScript.cpp:76