From 6be1e0a8d6ab96da3afc19c3f1b196952e55eedb Mon Sep 17 00:00:00 2001 From: YuLei Liao Date: Thu, 8 Dec 2011 00:29:22 +0800 Subject: [PATCH] * change CCLuaEngine::executeFunctionByRefID() to public --- lua/cocos2dx_support/CCLuaEngine.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lua/cocos2dx_support/CCLuaEngine.h b/lua/cocos2dx_support/CCLuaEngine.h index 83b5193ed6..35c4be7d02 100644 --- a/lua/cocos2dx_support/CCLuaEngine.h +++ b/lua/cocos2dx_support/CCLuaEngine.h @@ -97,7 +97,7 @@ public: @brief Method used to get a pointer to the lua_State that the script module is attached to. @return A pointer to the lua_State that the script module is attached to. */ - lua_State* getLuaState(void) const { + lua_State* getLuaState(void) { return m_state; } @@ -132,6 +132,13 @@ public: */ int executeGlobalFunction(const char* function_name); + /** + @brief Execute a function by ref id + @param The function ref id + @param Number of parameters + @return The integer value returned from the script function. + */ + int executeFunctionByRefID(int functionRefId, int numArgs = 0); int executeFunctionWithIntegerData(int functionRefId, int data); int executeFunctionWithFloatData(int functionRefId, float data); int executeFunctionWithBooleanData(int functionRefId, bool data); @@ -151,14 +158,6 @@ private: static CCLuaEngine* s_engine; lua_State* m_state; - - /** - @brief Execute a function by ref id - @param The function ref id - @param Number of parameters - @return The integer value returned from the script function. - */ - int executeFunctionByRefID(int functionRefId, int numArgs = 0); }; } // namespace cocos2d