Lua support for cocos2d-x. More...
#include <CCLuaStack.h>
Public Member Functions | |
lua_State * | getLuaState (void) |
Method used to get a pointer to the lua_State that the script module is attached to. More... | |
virtual void | addSearchPath (const char *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... | |
virtual void | removeScriptObjectByCCObject (CCObject *pObj) |
Remove CCObject from lua state. More... | |
virtual void | removeScriptHandler (int nHandler) |
Remove Lua function reference. More... | |
virtual int | reallocateScriptHandler (int nHandler) |
Remove 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... | |
virtual int | executeGlobalFunction (const char *functionName) |
Execute a scripted global function. More... | |
virtual void | clean (void) |
virtual void | pushInt (int intValue) |
virtual void | pushFloat (float floatValue) |
virtual void | pushBoolean (bool boolValue) |
virtual void | pushString (const char *stringValue) |
virtual void | pushString (const char *stringValue, int length) |
virtual void | pushNil (void) |
virtual void | pushCCObject (CCObject *objectValue, const char *typeName) |
virtual void | pushCCLuaValue (const CCLuaValue &value) |
virtual void | pushCCLuaValueDict (const CCLuaValueDict &dict) |
virtual void | pushCCLuaValueArray (const CCLuaValueArray &array) |
virtual bool | pushFunctionByHandler (int nHandler) |
virtual int | executeFunction (int numArgs) |
virtual int | executeFunctionByHandler (int nHandler, int numArgs) |
virtual int | executeFunctionReturnArray (int nHandler, int nNumArgs, int nNummResults, CCArray *pResultArray) |
virtual bool | handleAssert (const char *msg) |
![]() | |
CCObject (void) | |
virtual | ~CCObject (void) |
void | release (void) |
void | retain (void) |
CCObject * | autorelease (void) |
CCObject * | copy (void) |
bool | isSingleReference (void) const |
unsigned int | retainCount (void) const |
virtual bool | isEqual (const CCObject *pObject) |
virtual void | acceptVisitor (CCDataVisitor &visitor) |
virtual void | update (float dt) |
![]() | |
virtual CCObject * | copyWithZone (CCZone *pZone) |
Static Public Member Functions | |
static CCLuaStack * | create (void) |
static CCLuaStack * | attach (lua_State *L) |
Protected Member Functions | |
CCLuaStack (void) | |
bool | init (void) |
bool | initWithLuaState (lua_State *L) |
Protected Attributes | |
lua_State * | m_state |
int | m_callFromLua |
![]() | |
unsigned int | m_uReference |
unsigned int | m_uAutoReleaseCount |
Additional Inherited Members | |
![]() | |
unsigned int | m_uID |
int | m_nLuaID |
Lua support for cocos2d-x.
|
inlineprotected |
|
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 |
|
static |
|
virtual |
|
static |
|
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 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. |
|
inline |
Method used to get a pointer to the lua_State that the script module is attached to.
|
virtual |
|
protected |
|
protected |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Remove Lua function reference.
|
virtual |
Remove Lua function reference.
|
virtual |
Remove CCObject from lua state.
object | to remove |
|
protected |
|
protected |