#include <CCLuaEngine.h>
Public Member Functions | |
| virtual | ~LuaEngine (void) |
| virtual ccScriptType | getScriptType () |
| LuaStack * | getLuaStack (void) |
| local | getLuaStack () |
| virtual void | addSearchPath (const char *path) |
| Add a path to find lua files in. More... | |
| local | addSearchPath ( local path) |
| Add a path to find lua files in. More... | |
| virtual void | addLuaLoader (lua_CFunction func) |
| Add lua loader, now it is used on android. More... | |
| local | addLuaLoader ( local func) |
| Add lua loader, now it is used on android. More... | |
| virtual int | reload (const char *moduleFileName) |
| reload script code contained in the given string. More... | |
| local | reload ( local moduleFileName) |
| reload script code contained in the given string. More... | |
| virtual void | removeScriptObjectByObject (Ref *object) |
| Remove Object from lua state. More... | |
| virtual void | removeScriptHandler (int nHandler) |
| Remove Lua function reference. More... | |
| virtual int | reallocateScriptHandler (int nHandler) |
| Reallocate Lua function reference. More... | |
| var | reallocateScriptHandler ( var nHandler) |
| Reallocate Lua function reference. More... | |
| local | reallocateScriptHandler ( local nHandler) |
| Reallocate Lua function reference. More... | |
| virtual int | executeString (const char *codes) |
| Execute script code contained in the given string. More... | |
| virtual int | executeScriptFile (const char *filename) |
| Execute a script file. More... | |
| var | executeScriptFile ( var filename) |
| Execute a script file. More... | |
| local | executeScriptFile ( local filename) |
| Execute a script file. More... | |
| virtual int | executeGlobalFunction (const char *functionName) |
| Execute a scripted global function. More... | |
| virtual int | executeNodeEvent (Node *pNode, int nAction) |
| virtual int | executeMenuItemEvent (MenuItem *pMenuItem) |
| virtual int | executeNotificationEvent (__NotificationCenter *pNotificationCenter, const char *pszName) |
| virtual int | executeCallFuncActionEvent (CallFunc *pAction, Ref *pTarget=NULL) |
| virtual int | executeSchedule (int nHandler, float dt, Node *pNode=NULL) |
| virtual int | executeLayerTouchesEvent (Layer *pLayer, int eventType, __Set *pTouches) |
| local | executeLayerTouchesEvent ( local pLayer, local eventType, local pTouches) |
| virtual int | executeLayerTouchEvent (Layer *pLayer, int eventType, Touch *pTouch) |
| local | executeLayerTouchEvent ( local pLayer, local eventType, local pTouch) |
| virtual int | executeLayerKeypadEvent (Layer *pLayer, int eventType) |
| var | executeLayerKeypadEvent ( var pLayer, var eventType) |
| local | executeLayerKeypadEvent ( local pLayer, local eventType) |
| virtual int | executeAccelerometerEvent (Layer *pLayer, Acceleration *pAccelerationValue) |
| execute a accelerometer event More... | |
| virtual int | executeEvent (int nHandler, const char *pEventName, Ref *pEventSource=NULL, const char *pEventSourceClassName=NULL) |
| var | executeEvent ( var nHandler, var pEventName, var NULL, var NULL) |
| local | executeEvent ( local nHandler, local pEventName, local NULL, local NULL) |
| virtual bool | handleAssert (const char *msg) |
| virtual bool | parseConfig (ConfigType type, const std::string &str) override |
| var | parseConfig ( var type, var str) |
| local | parseConfig ( local type, local str) |
| virtual int | sendEvent (ScriptEvent *message) override |
| var | sendEvent ( var message) |
| local | sendEvent ( local message) |
| virtual int | handleEvent (ScriptHandlerMgr::HandlerType type, void *data) |
| local | handleEvent ( local type, local data) |
| virtual int | handleEvent (ScriptHandlerMgr::HandlerType type, void *data, int numResults, const std::function< void(lua_State *, int)> &func) |
| local | handleEvent ( local type, local data, local numResults, local func) |
Static Public Member Functions | |
| static LuaEngine * | getInstance (void) |
| static LuaEngine * | defaultEngine (void) |
| var | defaultEngine () |
| local | defaultEngine () |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Add lua loader, now it is used on android.
|
virtual |
Add lua loader, now it is used on android.
|
virtual |
Add lua loader, now it is used on android.
|
virtual |
Add a path to find lua files in.
| path | to be added to the Lua path |
|
virtual |
Add a path to find lua files in.
| path | to be added to the Lua path |
|
virtual |
Add a path to find lua files in.
| path | to be added to the Lua path |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
virtual |
execute a accelerometer event
|
virtual |
execute a accelerometer event
|
virtual |
execute a accelerometer event
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Execute a scripted global function.
The function should not take any parameters and should return an integer.
| functionName | String object holding the name of the function, in the global script environment, that is to be executed. |
|
virtual |
Execute a scripted global function.
The function should not take any parameters and should return an integer.
| functionName | String object holding the name of the function, in the global script environment, that is to be executed. |
|
virtual |
Execute a scripted global function.
The function should not take any parameters and should return an integer.
| functionName | String object holding the name of the function, in the global script environment, that is to be executed. |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Execute a script file.
| filename | String object holding the filename of the script file that is to be executed |
|
virtual |
Execute a script file.
| filename | String object holding the filename of the script file that is to be executed |
|
virtual |
Execute a script file.
| filename | String object holding the filename of the script file that is to be executed |
|
virtual |
Execute script code contained in the given string.
| codes | holding the valid script code that should be executed. |
|
virtual |
Execute script code contained in the given string.
| codes | holding the valid script code that should be executed. |
|
virtual |
Execute script code contained in the given string.
| codes | holding the valid script code that should be executed. |
|
static |
|
static |
|
static |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
virtual |
Reallocate Lua function reference.
|
virtual |
Reallocate Lua function reference.
|
virtual |
Reallocate Lua function reference.
|
virtual |
reload script code contained in the given string.
| moduleFileName | String object holding the filename of the script file that is to be executed |
|
virtual |
reload script code contained in the given string.
| moduleFileName | String object holding the filename of the script file that is to be executed |
|
virtual |
reload script code contained in the given string.
| moduleFileName | String object holding the filename of the script file that is to be executed |
|
virtual |
Remove Lua function reference.
|
virtual |
Remove Lua function reference.
|
virtual |
Remove Lua function reference.
|
virtual |
Remove Object from lua state.
| object | to remove |
|
virtual |
Remove Object from lua state.
| object | to remove |
|
virtual |
Remove Object from lua state.
| object | to remove |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |