Cocos2d-x  v3.12
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
Lua Binding

Namespaces

 cocos2d
 Copyright 2013 BlackBerry Inc.
 

Classes

class  LuaBridge
 Build bridge between ObjC and Lua. More...
 
class  LuaEngine
 The LuaEngine integrated into the cocos2d-x to process the interactive operation between lua and c++. More...
 
class  LuaStack
 LuaStack is used to manager the operation on the lua_State,eg., push data onto the lua_State, execute the function depended on the lua_State, and so on. More...
 
class  LuaValue
 Wrap different general types of data into a same specific type named LuaValue. More...
 
class  GLNode
 The GLNode is wrapped to call the callback function about draw in the Lua. More...
 
class  LuaCallFunc
 The LuaCallFunc is wrapped to call the callback function in the Lua conveniently and don't insert useless code to processing the Lua in the CallFuncN. More...
 
class  ScriptHandlerMgr
 In order to reduce the coupling of lua script engine and native c++ engine. More...
 
class  LuaJavaBridge
 Build a bridge between Java and Lua script. More...
 
class  LuaObjcBridge
 Build a bridge between ObjectC and Lua script. More...
 

Enumerations

enum  LuaBridgeError { ,
  kLuaBridgeErrorInvalidParameters = -1, kLuaBridgeErrorClassNotFound = -2, kLuaBridgeErrorMethodNotFound = -3, kLuaBridgeErrorExceptionOccurred = -4,
  kLuaBridgeErrorMethodSignature = -5, kLuaBridgeErrorJavaVMError = -6
}
 LuaBridge Error enum, with inline docs. More...
 
enum  HandlerType : int
 HandlerType enum. More...
 

Functions

int register_physics3d_module (lua_State *L)
 Call this function can import the lua bindings for the physics3d module. More...
 

Detailed Description

Enumeration Type Documentation

enum LuaBridgeError

LuaBridge Error enum, with inline docs.

Enumerator
kLuaBridgeErrorInvalidParameters 

< value 0

kLuaBridgeErrorClassNotFound 

< value -1

kLuaBridgeErrorMethodNotFound 

< value -2

kLuaBridgeErrorExceptionOccurred 

< value -3

kLuaBridgeErrorMethodSignature 

< value -4

kLuaBridgeErrorJavaVMError 

< value -5

var LuaBridgeError

LuaBridge Error enum, with inline docs.

Enumerator
kLuaBridgeErrorInvalidParameters 

< value 0

kLuaBridgeErrorClassNotFound 

< value -1

kLuaBridgeErrorMethodNotFound 

< value -2

kLuaBridgeErrorExceptionOccurred 

< value -3

kLuaBridgeErrorMethodSignature 

< value -4

kLuaBridgeErrorJavaVMError 

< value -5

local LuaBridgeError

LuaBridge Error enum, with inline docs.

Enumerator
kLuaBridgeErrorInvalidParameters 

< value 0

kLuaBridgeErrorClassNotFound 

< value -1

kLuaBridgeErrorMethodNotFound 

< value -2

kLuaBridgeErrorExceptionOccurred 

< value -3

kLuaBridgeErrorMethodSignature 

< value -4

kLuaBridgeErrorJavaVMError 

< value -5

enum HandlerType : int
strong

HandlerType enum.

This enum class represent the processing event type for c++ calling the Lua function.

var int
strong

HandlerType enum.

This enum class represent the processing event type for c++ calling the Lua function.

local int
strong

HandlerType enum.

This enum class represent the processing event type for c++ calling the Lua function.

Function Documentation

int register_physics3d_module ( lua_State *  L)

Call this function can import the lua bindings for the physics3d module.

After registering, we could call the related physics3d code conveniently in the lua.eg,cc.Physics3DShape:createBox(cc.vec3(0.5, 0.5, 0.5)). If you don't want to use the physics3d module in the lua, you only don't call this registering function. If you don't register the physics3d module, the package size would become smaller . The current mechanism,this function is called in the lua_module_register.h and the register function's effect is limited by the marco values of CC_USE_3D_PHYSICS and CC_ENABLE_BULLET_INTEGRATION

var register_physics3d_module ( var  L)

Call this function can import the lua bindings for the physics3d module.

After registering, we could call the related physics3d code conveniently in the lua.eg,cc.Physics3DShape:createBox(cc.vec3(0.5, 0.5, 0.5)). If you don't want to use the physics3d module in the lua, you only don't call this registering function. If you don't register the physics3d module, the package size would become smaller . The current mechanism,this function is called in the lua_module_register.h and the register function's effect is limited by the marco values of CC_USE_3D_PHYSICS and CC_ENABLE_BULLET_INTEGRATION

local register_physics3d_module ( local  L)

Call this function can import the lua bindings for the physics3d module.

After registering, we could call the related physics3d code conveniently in the lua.eg,cc.Physics3DShape:createBox(cc.vec3(0.5, 0.5, 0.5)). If you don't want to use the physics3d module in the lua, you only don't call this registering function. If you don't register the physics3d module, the package size would become smaller . The current mechanism,this function is called in the lua_module_register.h and the register function's effect is limited by the marco values of CC_USE_3D_PHYSICS and CC_ENABLE_BULLET_INTEGRATION