Axmol Engine 2.4.0-258ceca
|
For Lua, the CommonScriptData is used to find the Lua function pointer by the handler, then call the Lua function by push the eventName, eventSource(if it not nullptr), eventSourceClassName(if it is nullptr or "", and the eventSource is not nullptr,would give the default string "cc.Object") into the Lua stack as the parameter when the common event such as is triggered. More...
#include <ScriptSupport.h>
Public Member Functions | |
CommonScriptData (int inHandler, const char *inName, Object *inSource=nullptr, const char *inClassName=nullptr) | |
Constructor of CommonScriptData. | |
Public Attributes | |
int | handler |
The index to find the corresponding to the Lua function pointer. | |
char | eventName [64] |
The string value to be pushed into the Lua stack. | |
Object * | eventSource |
The source object trigger the event,could be nullptr. | |
char | eventSourceClassName [64] |
The class name of source object trigger the event, could be nullptr. | |
For Lua, the CommonScriptData is used to find the Lua function pointer by the handler, then call the Lua function by push the eventName, eventSource(if it not nullptr), eventSourceClassName(if it is nullptr or "", and the eventSource is not nullptr,would give the default string "cc.Object") into the Lua stack as the parameter when the common event such as is triggered.
@js NA
|
inline |
Constructor of CommonScriptData.
@lua NA @js NA
int handler |
The index to find the corresponding to the Lua function pointer.
@lua NA @js NA
char eventName[64] |
The string value to be pushed into the Lua stack.
@lua NA @js NA
Object* eventSource |
The source object trigger the event,could be nullptr.
@lua NA @js NA
char eventSourceClassName[64] |
The class name of source object trigger the event, could be nullptr.
@lua NA @js NA