cocos2d-x 3.0
- 首页 - 相关页面 - 模块 - 命名空间 - - 文件 -
Public 成员函数 - 图1 Public 成员函数 - 图2)
- 类列表 - 类索引 - 类继承关系 - 类成员

全部)) 命名空间) 文件) 函数) 变量) 类型定义) 枚举) 枚举值) 属性) 友元) 宏定义)))

Public 成员函数 | 静态 Public 成员函数 | 所有成员列表

LuaEngine类 参考

#include

类 LuaEngine 继承关系图:

Public 成员函数 - 图3

## 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)
## 静态 Public 成员函数
static LuaEngine getInstance (void)
static CC_DEPRECATED_ATTRIBUTE LuaEngine defaultEngine (void)

构造及析构函数说明

virtual ~LuaEngine ( void )

virtual

成员函数说明

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.

  • 参数
  • pathto be added to the Lua path

static CC_DEPRECATED_ATTRIBUTE LuaEngine* defaultEngine ( void )

inlinestatic

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.

  • 参数
  • functionNameString object holding the name of the function, in the global script environment, that is to be executed.

  • 返回
  • 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.

  • 参数
  • filenameString object holding the filename of the script file that is to be executed

virtual int executeString ( const char * codes)

virtual

Execute script code contained in the given string.

  • 参数
  • codesholding the valid script code that should be executed.

  • 返回
  • 0 if the string is excuted correctly.
  • other if the string is excuted wrongly.

static LuaEngine* getInstance ( void )

static

LuaStack* getLuaStack ( void )

inline

virtual ccScriptType getScriptType ( )

inlinevirtual

virtual bool handleAssert ( const char * msg)

virtual

virtual int handleEvent ( ScriptHandlerMgr::HandlerType type,
void * data
)

virtual

virtual int handleEvent ( ScriptHandlerMgr::HandlerType type,
void data,
int numResults,
const std::function< void(lua_State , int)> & func
)

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.

  • 参数
  • moduleFileNameString object holding the filename of the script file that is to be executed

  • 返回
  • 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.

  • 参数
  • objectto remove

virtual int sendEvent ( ScriptEvent * message)

overridevirtual


该类的文档由以下文件生成:

  • /Users/zeroyang/Documents/github/cocos2d-x/cocos/scripting/lua-bindings/manual/CCLuaEngine.h
  • cocos2d
  • LuaEngine
  • 生成于 2014年 五月 29日 星期四 09:41:46 , 为 cocos2d-x使用 doxygen 1.8.6