restore CCLuaEngine missed methods

This commit is contained in:
dualface 2013-02-04 11:28:09 +08:00
parent f8c372ca9b
commit 74e497bb2b
2 changed files with 22 additions and 1 deletions

View File

@ -54,6 +54,16 @@ bool CCLuaEngine::init(void)
return true; return true;
} }
void CCLuaEngine::addSearchPath(const char* path)
{
m_stack->addSearchPath(path);
}
void CCLuaEngine::addLuaLoader(lua_CFunction func)
{
m_stack->addLuaLoader(func);
}
void CCLuaEngine::removeScriptObjectByCCObject(CCObject* pObj) void CCLuaEngine::removeScriptObjectByCCObject(CCObject* pObj)
{ {
m_stack->removeScriptObjectByCCObject(pObj); m_stack->removeScriptObjectByCCObject(pObj);

View File

@ -54,7 +54,18 @@ public:
CCLuaStack *getLuaStack(void) { CCLuaStack *getLuaStack(void) {
return m_stack; return m_stack;
} }
/**
@brief Add a path to find lua files in
@param path to be added to the Lua path
*/
virtual void addSearchPath(const char* path);
/**
@brief Add lua loader, now it is used on android
*/
virtual void addLuaLoader(lua_CFunction func);
/** /**
@brief Remove CCObject from lua state @brief Remove CCObject from lua state
@param object to remove @param object to remove