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.Ref") into the Lua stack as the parameter when the common event such as is triggered. More...
Public Member Functions | |
CommonScriptData (int inHandler, const char *inName, Ref *inSource=nullptr, const char *inClassName=nullptr) | |
Constructor of CommonScriptData. | |
CommonScriptData ( var inHandler, var inName, var nullptr, var nullptr) | |
Constructor of CommonScriptData. | |
CommonScriptData ( local inHandler, local inName, local nullptr, local nullptr) | |
Constructor of CommonScriptData. | |
Public Attributes | |
int | handler |
The index to find the corresponding to the Lua function pointer. | |
local | 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. | |
var | eventName () |
The string value to be pushed into the Lua stack. | |
local | eventName () |
The string value to be pushed into the Lua stack. | |
Ref * | eventSource |
The source object trigger the event,could be nullptr. | |
char | eventSourceClassName [64] |
The class name of source object trigger the event, could be 0. | |
var | eventSourceClassName () |
The class name of source object trigger the event, could be 0. | |
local | eventSourceClassName () |
The class name of source object trigger the event, could be 0. | |
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.Ref") into the Lua stack as the parameter when the common event such as is triggered.