- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件
-
)
- 类列表
- 类索引
- 类继承关系
- 类成员
全部) 类) 命名空间) 文件) 函数) 变量) 类型定义) 枚举) 枚举值) 属性) 友元) 宏定义) 组) 页)
Public 成员函数 | 静态 Public 成员函数 | 所有成员列表
LuaEngine类 参考
#include
类 LuaEngine 继承关系图:
## Public 成员函数
|
virtual | ~LuaEngine (void) |
|
virtual ccScriptType | getScriptType () |
|
LuaStack | getLuaStack (void) |
|
virtual void | addSearchPath (const char path) |
| Add a path to find lua files in. 更多…
|
|
virtual void | addLuaLoader (lua_CFunction func) |
| Add lua loader, now it is used on android. 更多…
|
|
virtual int | reload (const char moduleFileName) |
| reload script code contained in the given string. 更多…
|
|
virtual void | removeScriptObjectByObject (Ref object) |
| Remove Object from lua state. 更多…
|
|
virtual void | removeScriptHandler (int nHandler) |
| Remove Lua function reference. 更多…
|
|
virtual int | reallocateScriptHandler (int nHandler) |
| Reallocate Lua function reference. 更多…
|
|
virtual int | executeString (const char codes) |
| Execute script code contained in the given string. 更多…
|
|
virtual int | executeScriptFile (const char filename) |
| Execute a script file. 更多…
|
|
virtual int | executeGlobalFunction (const char functionName) |
| Execute a scripted global function. 更多…
|
|
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) |
|
virtual int | executeLayerTouchEvent (Layer pLayer, int eventType, Touch pTouch) |
|
virtual int | executeLayerKeypadEvent (Layer pLayer, int eventType) |
|
virtual int | executeAccelerometerEvent (Layer pLayer, Acceleration pAccelerationValue) |
| execute a accelerometer event 更多…
|
|
virtual int | executeEvent (int nHandler, const char pEventName, Ref pEventSource=NULL, const char pEventSourceClassName=NULL) |
|
virtual bool | handleAssert (const char msg) |
|
virtual bool | parseConfig (ConfigType type, const std::string &str) override |
|
virtual int | sendEvent (ScriptEvent message) override |
|
virtual int | handleEvent (ScriptHandlerMgr::HandlerType type, void data) |
|
virtual int | handleEvent (ScriptHandlerMgr::HandlerType type, void data, int numResults, const std::function< void(lua_State *, int)> &func) |
|
构造及析构函数说明
成员函数说明
virtual void addLuaLoader | ( | lua_CFunction | func | ) | |
| virtual |
Add lua loader, now it is used on android.
virtual void addSearchPath | ( | const char * | path | ) | |
| virtual |
Add a path to find lua files in.
virtual int executeAccelerometerEvent | ( | Layer | pLayer, | | | Acceleration | pAccelerationValue | | ) | | |
| virtual |
execute a accelerometer event
virtual int executeCallFuncActionEvent | ( | CallFunc | pAction, | | | Ref | pTarget = NULL | | ) | | |
| virtual |
virtual int executeEvent | ( | int | nHandler, | | | const char | pEventName, | | | Ref | pEventSource = NULL , | | | const char * | pEventSourceClassName = NULL | | ) | | |
| virtual |
virtual int executeGlobalFunction | ( | const char * | functionName | ) | |
| virtual |
Execute a scripted global function.
The function should not take any parameters and should return an integer.
- 返回
- The integer value returned from the script function.
virtual int executeLayerKeypadEvent | ( | Layer * | pLayer, | | | int | eventType | | ) | | |
| virtual |
virtual int executeLayerTouchesEvent | ( | Layer | pLayer, | | | int | eventType, | | | __Set | pTouches | | ) | | |
| virtual |
virtual int executeLayerTouchEvent | ( | Layer | pLayer, | | | int | eventType, | | | Touch | pTouch | | ) | | |
| virtual |
virtual int executeMenuItemEvent | ( | MenuItem * | pMenuItem | ) | |
| virtual |
virtual int executeNodeEvent | ( | Node * | pNode, | | | int | nAction | | ) | | |
| virtual |
virtual int executeNotificationEvent | ( | __NotificationCenter | pNotificationCenter, | | | const char | pszName | | ) | | |
| virtual |
virtual int executeSchedule | ( | int | nHandler, | | | float | dt, | | | Node * | pNode = NULL | | ) | | |
| virtual |
virtual int executeScriptFile | ( | const char * | filename | ) | |
| virtual |
Execute a script file.
virtual int executeString | ( | const char * | codes | ) | |
| virtual |
Execute script code contained in the given string.
- 返回
- 0 if the string is excuted correctly.
- other if the string is excuted wrongly.
virtual ccScriptType getScriptType | ( | | ) | |
| inlinevirtual |
virtual bool handleAssert | ( | const char * | msg | ) | |
| virtual |
virtual bool parseConfig | ( | ConfigType | type, | | | const std::string & | str | | ) | | |
| overridevirtual |
virtual int reallocateScriptHandler | ( | int | nHandler | ) | |
| virtual |
Reallocate Lua function reference.
virtual int reload | ( | const char * | moduleFileName | ) | |
| virtual |
reload script code contained in the given string.
- 返回
- 0 if the string is excuted correctly.
- other if the string is excuted wrongly.
virtual void removeScriptHandler | ( | int | nHandler | ) | |
| virtual |
Remove Lua function reference.
virtual void removeScriptObjectByObject | ( | Ref * | object | ) | |
| virtual |
Remove Object from lua state.
virtual int sendEvent | ( | ScriptEvent * | message | ) | |
| overridevirtual |
该类的文档由以下文件生成:
- /Users/zeroyang/Documents/github/cocos2d-x/cocos/scripting/lua-bindings/manual/CCLuaEngine.h