Merge pull request #7147 from CocosRobot/update_lua_bindings_1403182654

[AUTO]: updating luabinding automatically
This commit is contained in:
minggo 2014-06-19 21:05:34 +08:00
commit c28c050c79
3 changed files with 65 additions and 0 deletions

View File

@ -18,4 +18,12 @@
-- @function [parent=#SkeletonAnimation] clearTrack
-- @param self
--------------------------------
-- @function [parent=#SkeletonAnimation] onAnimationStateEvent
-- @param self
-- @param #int int
-- @param #spEventType speventtype
-- @param #spEvent spevent
-- @param #int int
return nil

View File

@ -494,6 +494,61 @@ int lua_cocos2dx_spine_SkeletonAnimation_clearTrack(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent(lua_State* tolua_S)
{
int argc = 0;
spine::SkeletonAnimation* cobj = nullptr;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"sp.SkeletonAnimation",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (spine::SkeletonAnimation*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 4)
{
int arg0;
spEventType arg1;
spEvent* arg2;
int arg3;
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0);
ok &= luaval_to_int32(tolua_S, 3,(int *)&arg1);
#pragma warning NO CONVERSION TO NATIVE FOR spEvent*;
ok &= luaval_to_int32(tolua_S, 5,(int *)&arg3);
if(!ok)
return 0;
cobj->onAnimationStateEvent(arg0, arg1, arg2, arg3);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "onAnimationStateEvent",argc, 4);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent'.",&tolua_err);
#endif
return 0;
}
static int lua_cocos2dx_spine_SkeletonAnimation_finalize(lua_State* tolua_S)
{
printf("luabindings: finalizing LUA object (SkeletonAnimation)");
@ -509,6 +564,7 @@ int lua_register_cocos2dx_spine_SkeletonAnimation(lua_State* tolua_S)
tolua_function(tolua_S,"setMix",lua_cocos2dx_spine_SkeletonAnimation_setMix);
tolua_function(tolua_S,"clearTracks",lua_cocos2dx_spine_SkeletonAnimation_clearTracks);
tolua_function(tolua_S,"clearTrack",lua_cocos2dx_spine_SkeletonAnimation_clearTrack);
tolua_function(tolua_S,"onAnimationStateEvent",lua_cocos2dx_spine_SkeletonAnimation_onAnimationStateEvent);
tolua_endmodule(tolua_S);
std::string typeName = typeid(spine::SkeletonAnimation).name();
g_luaType[typeName] = "sp.SkeletonAnimation";

View File

@ -22,4 +22,5 @@ int register_all_cocos2dx_spine(lua_State* tolua_S);
#endif // __cocos2dx_spine_h__