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