Merge pull request #11421 from CocosRobot/update_lua_bindings_1428977404

[AUTO]: updating luabinding automatically
This commit is contained in:
minggo 2015-04-14 10:58:08 +08:00
commit 4aaa494be7
6 changed files with 116 additions and 66 deletions

View File

@ -86,15 +86,6 @@
-- @param self
-- @return CSLoader#CSLoader self (return value: cc.CSLoader)
--------------------------------
-- @overload self, string, function
-- @overload self, string
-- @function [parent=#CSLoader] createNode
-- @param self
-- @param #string filename
-- @param #function callback
-- @return Node#Node ret (return value: cc.Node)
--------------------------------
--
-- @function [parent=#CSLoader] getInstance

View File

@ -68,6 +68,13 @@
-- @param self
-- @return bool#bool ret (return value: bool)
--------------------------------
-- Get stroke.<br>
-- return float stroke.
-- @function [parent=#MotionStreak] getStroke
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
-- Sets fast mode or not.<br>
-- param bFastMode True if enabled fast mode.
@ -76,6 +83,14 @@
-- @param #bool bFastMode
-- @return MotionStreak#MotionStreak self (return value: cc.MotionStreak)
--------------------------------
-- Set stroke.<br>
-- param stroke The width of stroke.
-- @function [parent=#MotionStreak] setStroke
-- @param self
-- @param #float stroke
-- @return MotionStreak#MotionStreak self (return value: cc.MotionStreak)
--------------------------------
-- @overload self, float, float, float, color3b_table, cc.Texture2D
-- @overload self, float, float, float, color3b_table, string

View File

@ -48666,6 +48666,53 @@ int lua_cocos2dx_MotionStreak_isFastMode(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_MotionStreak_getStroke(lua_State* tolua_S)
{
int argc = 0;
cocos2d::MotionStreak* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.MotionStreak",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::MotionStreak*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_MotionStreak_getStroke'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_MotionStreak_getStroke'", nullptr);
return 0;
}
double ret = cobj->getStroke();
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MotionStreak:getStroke",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_MotionStreak_getStroke'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_MotionStreak_setFastMode(lua_State* tolua_S)
{
int argc = 0;
@ -48716,6 +48763,56 @@ int lua_cocos2dx_MotionStreak_setFastMode(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_MotionStreak_setStroke(lua_State* tolua_S)
{
int argc = 0;
cocos2d::MotionStreak* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"cc.MotionStreak",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::MotionStreak*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_MotionStreak_setStroke'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
double arg0;
ok &= luaval_to_number(tolua_S, 2,&arg0, "cc.MotionStreak:setStroke");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_MotionStreak_setStroke'", nullptr);
return 0;
}
cobj->setStroke(arg0);
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.MotionStreak:setStroke",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_MotionStreak_setStroke'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_MotionStreak_create(lua_State* tolua_S)
{
int argc = 0;
@ -48809,7 +48906,9 @@ int lua_register_cocos2dx_MotionStreak(lua_State* tolua_S)
tolua_function(tolua_S,"getBlendFunc",lua_cocos2dx_MotionStreak_getBlendFunc);
tolua_function(tolua_S,"isStartingPositionInitialized",lua_cocos2dx_MotionStreak_isStartingPositionInitialized);
tolua_function(tolua_S,"isFastMode",lua_cocos2dx_MotionStreak_isFastMode);
tolua_function(tolua_S,"getStroke",lua_cocos2dx_MotionStreak_getStroke);
tolua_function(tolua_S,"setFastMode",lua_cocos2dx_MotionStreak_setFastMode);
tolua_function(tolua_S,"setStroke",lua_cocos2dx_MotionStreak_setStroke);
tolua_function(tolua_S,"create", lua_cocos2dx_MotionStreak_create);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::MotionStreak).name();

View File

@ -1634,6 +1634,8 @@ int register_all_cocos2dx(lua_State* tolua_S);

View File

@ -589,61 +589,6 @@ int lua_cocos2dx_csloader_CSLoader_destroyInstance(lua_State* tolua_S)
#endif
return 0;
}
int lua_cocos2dx_csloader_CSLoader_createNode(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"cc.CSLoader",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S)-1;
do
{
if (argc == 2)
{
std::string arg0;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.CSLoader:createNode");
if (!ok) { break; }
std::function<void (cocos2d::Ref *)> arg1;
do {
// Lambda binding for lua is not supported.
assert(false);
} while(0)
;
if (!ok) { break; }
cocos2d::Node* ret = cocos2d::CSLoader::createNode(arg0, arg1);
object_to_luaval<cocos2d::Node>(tolua_S, "cc.Node",(cocos2d::Node*)ret);
return 1;
}
} while (0);
ok = true;
do
{
if (argc == 1)
{
std::string arg0;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.CSLoader:createNode");
if (!ok) { break; }
cocos2d::Node* ret = cocos2d::CSLoader::createNode(arg0);
object_to_luaval<cocos2d::Node>(tolua_S, "cc.Node",(cocos2d::Node*)ret);
return 1;
}
} while (0);
ok = true;
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.CSLoader:createNode",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_csloader_CSLoader_createNode'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_csloader_CSLoader_getInstance(lua_State* tolua_S)
{
int argc = 0;
@ -738,7 +683,6 @@ int lua_register_cocos2dx_csloader_CSLoader(lua_State* tolua_S)
tolua_function(tolua_S,"setRecordJsonPath",lua_cocos2dx_csloader_CSLoader_setRecordJsonPath);
tolua_function(tolua_S,"createNodeWithFlatBuffersForSimulator",lua_cocos2dx_csloader_CSLoader_createNodeWithFlatBuffersForSimulator);
tolua_function(tolua_S,"destroyInstance", lua_cocos2dx_csloader_CSLoader_destroyInstance);
tolua_function(tolua_S,"createNode", lua_cocos2dx_csloader_CSLoader_createNode);
tolua_function(tolua_S,"getInstance", lua_cocos2dx_csloader_CSLoader_getInstance);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::CSLoader).name();

View File

@ -27,5 +27,4 @@ int register_all_cocos2dx_csloader(lua_State* tolua_S);
#endif // __cocos2dx_csloader_h__