mirror of https://github.com/axmolengine/axmol.git
[ci skip][AUTO]: updating luabinding & jsbinding automatically (#16395)
This commit is contained in:
parent
3ecaa71944
commit
d09ee83c5a
|
@ -2921,6 +2921,16 @@ matrix_stack_type
|
|||
return cc.Mat4;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method isValid
|
||||
* @return {bool}
|
||||
*/
|
||||
isValid : function (
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method startAnimation
|
||||
*/
|
||||
|
|
|
@ -7109,6 +7109,24 @@ bool js_cocos2dx_Director_getMatrix(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
JS_ReportError(cx, "js_cocos2dx_Director_getMatrix : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Director_isValid(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Director* cobj = (cocos2d::Director *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Director_isValid : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
bool ret = cobj->isValid();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = BOOLEAN_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Director_isValid : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Director_startAnimation(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -7878,6 +7896,7 @@ void js_register_cocos2dx_Director(JSContext *cx, JS::HandleObject global) {
|
|||
JS_FN("init", js_cocos2dx_Director_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setScheduler", js_cocos2dx_Director_setScheduler, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getMatrix", js_cocos2dx_Director_getMatrix, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("isValid", js_cocos2dx_Director_isValid, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("startAnimation", js_cocos2dx_Director_startAnimation, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getOpenGLView", js_cocos2dx_Director_getOpenGLView, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getRunningScene", js_cocos2dx_Director_getRunningScene, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
|
|
|
@ -367,6 +367,7 @@ bool js_cocos2dx_Director_setDefaultValues(JSContext *cx, uint32_t argc, jsval *
|
|||
bool js_cocos2dx_Director_init(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Director_setScheduler(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Director_getMatrix(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Director_isValid(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Director_startAnimation(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Director_getOpenGLView(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Director_getRunningScene(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
|
|
@ -204,6 +204,12 @@
|
|||
-- @param #int type
|
||||
-- @return mat4_table#mat4_table ret (return value: mat4_table)
|
||||
|
||||
--------------------------------
|
||||
-- returns whether or not the Director is in a valid state
|
||||
-- @function [parent=#Director] isValid
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- The main loop is triggered again.<br>
|
||||
-- Call this function only if [stopAnimation] was called earlier.<br>
|
||||
|
|
|
@ -14608,6 +14608,53 @@ int lua_cocos2dx_Director_getMatrix(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Director_isValid(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Director* 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.Director",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Director*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Director_isValid'", 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_Director_isValid'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->isValid();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Director:isValid",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Director_isValid'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Director_startAnimation(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -16468,6 +16515,7 @@ int lua_register_cocos2dx_Director(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"init",lua_cocos2dx_Director_init);
|
||||
tolua_function(tolua_S,"setScheduler",lua_cocos2dx_Director_setScheduler);
|
||||
tolua_function(tolua_S,"getMatrix",lua_cocos2dx_Director_getMatrix);
|
||||
tolua_function(tolua_S,"isValid",lua_cocos2dx_Director_isValid);
|
||||
tolua_function(tolua_S,"startAnimation",lua_cocos2dx_Director_startAnimation);
|
||||
tolua_function(tolua_S,"getOpenGLView",lua_cocos2dx_Director_getOpenGLView);
|
||||
tolua_function(tolua_S,"getRunningScene",lua_cocos2dx_Director_getRunningScene);
|
||||
|
|
|
@ -2213,6 +2213,7 @@ int register_all_cocos2dx(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_h__
|
||||
|
|
Loading…
Reference in New Issue