mirror of https://github.com/axmolengine/axmol.git
[ci skip][AUTO]: updating luabinding & jsbinding automatically
This commit is contained in:
parent
0cbc1e5f40
commit
37cb9afb3f
|
@ -647,16 +647,6 @@ init : function (
|
|||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getName
|
||||
* @return {String}
|
||||
*/
|
||||
getName : function (
|
||||
)
|
||||
{
|
||||
return ;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method setOwner
|
||||
* @param {cc.Node} arg0
|
||||
|
@ -667,6 +657,16 @@ node
|
|||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getName
|
||||
* @return {String}
|
||||
*/
|
||||
getName : function (
|
||||
)
|
||||
{
|
||||
return ;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method create
|
||||
* @return {cc.Component}
|
||||
|
@ -719,6 +719,16 @@ str
|
|||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method setPhysicsBody
|
||||
* @param {cc.Component} arg0
|
||||
*/
|
||||
setPhysicsBody : function (
|
||||
component
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getGLProgram
|
||||
* @return {cc.GLProgram}
|
||||
|
@ -1391,6 +1401,16 @@ getRotation : function (
|
|||
return 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getPhysicsBody
|
||||
* @return {cc.PhysicsBody}
|
||||
*/
|
||||
getPhysicsBody : function (
|
||||
)
|
||||
{
|
||||
return cc.PhysicsBody;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getAnchorPointInPoints
|
||||
* @return {vec2_object}
|
||||
|
@ -2162,16 +2182,6 @@ eventcustom
|
|||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getPhysicsManager
|
||||
* @return {cc.PhysicsManager}
|
||||
*/
|
||||
getPhysicsManager : function (
|
||||
)
|
||||
{
|
||||
return cc.PhysicsManager;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method initWithSize
|
||||
* @param {size_object} arg0
|
||||
|
|
|
@ -2962,16 +2962,6 @@ ComController : function (
|
|||
*/
|
||||
ccs.ComRender = {
|
||||
|
||||
/**
|
||||
* @method getNode
|
||||
* @return {cc.Node}
|
||||
*/
|
||||
getNode : function (
|
||||
)
|
||||
{
|
||||
return cc.Node;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method setNode
|
||||
* @param {cc.Node} arg0
|
||||
|
@ -2982,6 +2972,16 @@ node
|
|||
{
|
||||
},
|
||||
|
||||
/**
|
||||
* @method getNode
|
||||
* @return {cc.Node}
|
||||
*/
|
||||
getNode : function (
|
||||
)
|
||||
{
|
||||
return cc.Node;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method create
|
||||
* @param {cc.Node} node
|
||||
|
|
|
@ -1749,24 +1749,6 @@ bool js_cocos2dx_Component_init(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
JS_ReportError(cx, "js_cocos2dx_Component_init : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Component_getName(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::Component* cobj = (cocos2d::Component *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Component_getName : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
const std::string& ret = cobj->getName();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = std_string_to_jsval(cx, ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Component_getName : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Component_setOwner(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -1795,6 +1777,24 @@ bool js_cocos2dx_Component_setOwner(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
JS_ReportError(cx, "js_cocos2dx_Component_setOwner : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Component_getName(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::Component* cobj = (cocos2d::Component *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Component_getName : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
const std::string& ret = cobj->getName();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = std_string_to_jsval(cx, ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Component_getName : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Component_create(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -1888,8 +1888,8 @@ void js_register_cocos2dx_Component(JSContext *cx, JS::HandleObject global) {
|
|||
JS_FN("isEnabled", js_cocos2dx_Component_isEnabled, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getOwner", js_cocos2dx_Component_getOwner, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("init", js_cocos2dx_Component_init, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getName", js_cocos2dx_Component_getName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setOwner", js_cocos2dx_Component_setOwner, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getName", js_cocos2dx_Component_getName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("ctor", js_cocos2dx_Component_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
|
@ -2084,6 +2084,34 @@ bool js_cocos2dx_Node_removeComponent(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
JS_ReportError(cx, "js_cocos2dx_Node_removeComponent : wrong number of arguments");
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Node_setPhysicsBody(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
cocos2d::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_setPhysicsBody : Invalid Native Object");
|
||||
if (argc == 1) {
|
||||
cocos2d::Component* arg0 = nullptr;
|
||||
do {
|
||||
if (args.get(0).isNull()) { arg0 = nullptr; break; }
|
||||
if (!args.get(0).isObject()) { ok = false; break; }
|
||||
js_proxy_t *jsProxy;
|
||||
JSObject *tmpObj = args.get(0).toObjectOrNull();
|
||||
jsProxy = jsb_get_js_proxy(tmpObj);
|
||||
arg0 = (cocos2d::Component*)(jsProxy ? jsProxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
|
||||
} while (0);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Node_setPhysicsBody : Error processing arguments");
|
||||
cobj->setPhysicsBody(arg0);
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Node_setPhysicsBody : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Node_getGLProgram(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -3652,6 +3680,31 @@ bool js_cocos2dx_Node_getRotation(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
JS_ReportError(cx, "js_cocos2dx_Node_getRotation : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Node_getPhysicsBody(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::Node* cobj = (cocos2d::Node *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Node_getPhysicsBody : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
cocos2d::PhysicsBody* ret = cobj->getPhysicsBody();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
do {
|
||||
if (ret) {
|
||||
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::PhysicsBody>(cx, (cocos2d::PhysicsBody*)ret);
|
||||
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
|
||||
} else {
|
||||
jsret = JSVAL_NULL;
|
||||
}
|
||||
} while (0);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Node_getPhysicsBody : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Node_getAnchorPointInPoints(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -5311,6 +5364,7 @@ void js_register_cocos2dx_Node(JSContext *cx, JS::HandleObject global) {
|
|||
static JSFunctionSpec funcs[] = {
|
||||
JS_FN("addChild", js_cocos2dx_Node_addChild, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("removeComponent", js_cocos2dx_Node_removeComponent, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setPhysicsBody", js_cocos2dx_Node_setPhysicsBody, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getShaderProgram", js_cocos2dx_Node_getGLProgram, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getDescription", js_cocos2dx_Node_getDescription, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setOpacityModifyRGB", js_cocos2dx_Node_setOpacityModifyRGB, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
|
@ -5376,6 +5430,7 @@ void js_register_cocos2dx_Node(JSContext *cx, JS::HandleObject global) {
|
|||
JS_FN("visit", js_cocos2dx_Node_visit, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setShaderProgram", js_cocos2dx_Node_setGLProgram, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getRotation", js_cocos2dx_Node_getRotation, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getPhysicsBody", js_cocos2dx_Node_getPhysicsBody, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getAnchorPointInPoints", js_cocos2dx_Node_getAnchorPointInPoints, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getRotationQuat", js_cocos2dx_Node_getRotationQuat, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("removeChildByName", js_cocos2dx_Node_removeChildByName, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
|
@ -5683,31 +5738,6 @@ bool js_cocos2dx_Scene_onProjectionChanged(JSContext *cx, uint32_t argc, jsval *
|
|||
JS_ReportError(cx, "js_cocos2dx_Scene_onProjectionChanged : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Scene_getPhysicsManager(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::Scene* cobj = (cocos2d::Scene *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Scene_getPhysicsManager : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
cocos2d::PhysicsManager* ret = cobj->getPhysicsManager();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
do {
|
||||
if (ret) {
|
||||
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::PhysicsManager>(cx, (cocos2d::PhysicsManager*)ret);
|
||||
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
|
||||
} else {
|
||||
jsret = JSVAL_NULL;
|
||||
}
|
||||
} while (0);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_Scene_getPhysicsManager : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_Scene_initWithSize(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -5874,7 +5904,6 @@ void js_register_cocos2dx_Scene(JSContext *cx, JS::HandleObject global) {
|
|||
JS_FN("render", js_cocos2dx_Scene_render, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("stepPhysicsAndNavigation", js_cocos2dx_Scene_stepPhysicsAndNavigation, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("onProjectionChanged", js_cocos2dx_Scene_onProjectionChanged, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getPhysicsManager", js_cocos2dx_Scene_getPhysicsManager, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("initWithSize", js_cocos2dx_Scene_initWithSize, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getDefaultCamera", js_cocos2dx_Scene_getDefaultCamera, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("ctor", js_cocos2dx_Scene_ctor, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
|
|
|
@ -110,8 +110,8 @@ bool js_cocos2dx_Component_setName(JSContext *cx, uint32_t argc, jsval *vp);
|
|||
bool js_cocos2dx_Component_isEnabled(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Component_getOwner(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Component_init(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Component_getName(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Component_setOwner(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Component_getName(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Component_create(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Component_Component(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
|
@ -124,6 +124,7 @@ void js_register_cocos2dx_Node(JSContext *cx, JS::HandleObject global);
|
|||
void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
|
||||
bool js_cocos2dx_Node_addChild(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Node_removeComponent(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Node_setPhysicsBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Node_getGLProgram(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Node_getDescription(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Node_setOpacityModifyRGB(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
@ -189,6 +190,7 @@ bool js_cocos2dx_Node_runAction(JSContext *cx, uint32_t argc, jsval *vp);
|
|||
bool js_cocos2dx_Node_visit(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Node_setGLProgram(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Node_getRotation(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Node_getPhysicsBody(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Node_getAnchorPointInPoints(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Node_getRotationQuat(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Node_removeChildByName(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
@ -279,7 +281,6 @@ bool js_cocos2dx_Scene_setCameraOrderDirty(JSContext *cx, uint32_t argc, jsval *
|
|||
bool js_cocos2dx_Scene_render(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Scene_stepPhysicsAndNavigation(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Scene_onProjectionChanged(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Scene_getPhysicsManager(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Scene_initWithSize(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Scene_getDefaultCamera(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_Scene_createWithSize(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
|
|
@ -8350,31 +8350,6 @@ void js_register_cocos2dx_studio_ComController(JSContext *cx, JS::HandleObject g
|
|||
JSClass *jsb_cocostudio_ComRender_class;
|
||||
JSObject *jsb_cocostudio_ComRender_prototype;
|
||||
|
||||
bool js_cocos2dx_studio_ComRender_getNode(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);
|
||||
cocostudio::ComRender* cobj = (cocostudio::ComRender *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_ComRender_getNode : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
cocos2d::Node* ret = cobj->getNode();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
do {
|
||||
if (ret) {
|
||||
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Node>(cx, (cocos2d::Node*)ret);
|
||||
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
|
||||
} else {
|
||||
jsret = JSVAL_NULL;
|
||||
}
|
||||
} while (0);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_studio_ComRender_getNode : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_studio_ComRender_setNode(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -8403,6 +8378,31 @@ bool js_cocos2dx_studio_ComRender_setNode(JSContext *cx, uint32_t argc, jsval *v
|
|||
JS_ReportError(cx, "js_cocos2dx_studio_ComRender_setNode : wrong number of arguments: %d, was expecting %d", argc, 1);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_studio_ComRender_getNode(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);
|
||||
cocostudio::ComRender* cobj = (cocostudio::ComRender *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_studio_ComRender_getNode : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
cocos2d::Node* ret = cobj->getNode();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
do {
|
||||
if (ret) {
|
||||
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::Node>(cx, (cocos2d::Node*)ret);
|
||||
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
|
||||
} else {
|
||||
jsret = JSVAL_NULL;
|
||||
}
|
||||
} while (0);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_studio_ComRender_getNode : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_studio_ComRender_create(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
|
@ -8563,8 +8563,8 @@ void js_register_cocos2dx_studio_ComRender(JSContext *cx, JS::HandleObject globa
|
|||
};
|
||||
|
||||
static JSFunctionSpec funcs[] = {
|
||||
JS_FN("getNode", js_cocos2dx_studio_ComRender_getNode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("setNode", js_cocos2dx_studio_ComRender_setNode, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FN("getNode", js_cocos2dx_studio_ComRender_getNode, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
|
|
|
@ -470,8 +470,8 @@ bool js_cocos2dx_studio_ComRender_constructor(JSContext *cx, uint32_t argc, jsva
|
|||
void js_cocos2dx_studio_ComRender_finalize(JSContext *cx, JSObject *obj);
|
||||
void js_register_cocos2dx_studio_ComRender(JSContext *cx, JS::HandleObject global);
|
||||
void register_all_cocos2dx_studio(JSContext* cx, JS::HandleObject obj);
|
||||
bool js_cocos2dx_studio_ComRender_getNode(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_studio_ComRender_setNode(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_studio_ComRender_getNode(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_studio_ComRender_create(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_studio_ComRender_ComRender(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
|
|
|
@ -193,10 +193,10 @@
|
|||
-- @return Ref#Ref ret (return value: cc.Ref)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#ComAudio] setEnabled
|
||||
-- js NA<br>
|
||||
-- lua NA
|
||||
-- @function [parent=#ComAudio] onRemove
|
||||
-- @param self
|
||||
-- @param #bool b
|
||||
-- @return ComAudio#ComAudio self (return value: ccs.ComAudio)
|
||||
|
||||
--------------------------------
|
||||
|
@ -206,19 +206,6 @@
|
|||
-- @param #void r
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#ComAudio] isEnabled
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- js NA<br>
|
||||
-- lua NA
|
||||
-- @function [parent=#ComAudio] onRemove
|
||||
-- @param self
|
||||
-- @return ComAudio#ComAudio self (return value: ccs.ComAudio)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#ComAudio] init
|
||||
|
|
|
@ -16,19 +16,6 @@
|
|||
-- @param self
|
||||
-- @return Ref#Ref ret (return value: cc.Ref)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#ComController] setEnabled
|
||||
-- @param self
|
||||
-- @param #bool b
|
||||
-- @return ComController#ComController self (return value: ccs.ComController)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#ComController] isEnabled
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- js NA<br>
|
||||
-- lua NA
|
||||
|
|
|
@ -8,7 +8,13 @@
|
|||
--
|
||||
-- @function [parent=#Component] setEnabled
|
||||
-- @param self
|
||||
-- @param #bool b
|
||||
-- @param #bool enabled
|
||||
-- @return Component#Component self (return value: cc.Component)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Component] onRemove
|
||||
-- @param self
|
||||
-- @return Component#Component self (return value: cc.Component)
|
||||
|
||||
--------------------------------
|
||||
|
@ -24,12 +30,6 @@
|
|||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Component] onRemove
|
||||
-- @param self
|
||||
-- @return Component#Component self (return value: cc.Component)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Component] update
|
||||
|
@ -51,8 +51,9 @@
|
|||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Component] onAdd
|
||||
-- @function [parent=#Component] setOwner
|
||||
-- @param self
|
||||
-- @param #cc.Node owner
|
||||
-- @return Component#Component self (return value: cc.Component)
|
||||
|
||||
--------------------------------
|
||||
|
@ -63,9 +64,8 @@
|
|||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Component] setOwner
|
||||
-- @function [parent=#Component] onAdd
|
||||
-- @param self
|
||||
-- @param #cc.Node pOwner
|
||||
-- @return Component#Component self (return value: cc.Component)
|
||||
|
||||
--------------------------------
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module ComponentPhysics2d
|
||||
-- @extend Component
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- Set physics body of this physics component. If the physics body is set to<br>
|
||||
-- another physics component before, will set another physics component's physics<br>
|
||||
-- body to null.<br>
|
||||
-- param physicsBody The physics body belongs to this component.
|
||||
-- @function [parent=#ComponentPhysics2d] setPhysicsBody
|
||||
-- @param self
|
||||
-- @param #cc.PhysicsBody physicsBody
|
||||
-- @return ComponentPhysics2d#ComponentPhysics2d self (return value: cc.ComponentPhysics2d)
|
||||
|
||||
--------------------------------
|
||||
-- Get the physics body of this component.<br>
|
||||
-- return The physics body of this component.
|
||||
-- @function [parent=#ComponentPhysics2d] getPhysicsBody
|
||||
-- @param self
|
||||
-- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, cc.PhysicsBody
|
||||
-- @overload self
|
||||
-- @function [parent=#ComponentPhysics2d] create
|
||||
-- @param self
|
||||
-- @param #cc.PhysicsBody physicsBody
|
||||
-- @return ComponentPhysics2d#ComponentPhysics2d ret (return value: cc.ComponentPhysics2d)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#ComponentPhysics2d] setEnabled
|
||||
-- @param self
|
||||
-- @param #bool value
|
||||
-- @return ComponentPhysics2d#ComponentPhysics2d self (return value: cc.ComponentPhysics2d)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#ComponentPhysics2d] onRemove
|
||||
-- @param self
|
||||
-- @return ComponentPhysics2d#ComponentPhysics2d self (return value: cc.ComponentPhysics2d)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#ComponentPhysics2d] onEnter
|
||||
-- @param self
|
||||
-- @return ComponentPhysics2d#ComponentPhysics2d self (return value: cc.ComponentPhysics2d)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#ComponentPhysics2d] onExit
|
||||
-- @param self
|
||||
-- @return ComponentPhysics2d#ComponentPhysics2d self (return value: cc.ComponentPhysics2d)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#ComponentPhysics2d] onAdd
|
||||
-- @param self
|
||||
-- @return ComponentPhysics2d#ComponentPhysics2d self (return value: cc.ComponentPhysics2d)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, cc.PhysicsBody
|
||||
-- @overload self
|
||||
-- @function [parent=#ComponentPhysics2d] ComponentPhysics2d
|
||||
-- @param self
|
||||
-- @param #cc.PhysicsBody phsicsBody
|
||||
-- @return ComponentPhysics2d#ComponentPhysics2d self (return value: cc.ComponentPhysics2d)
|
||||
|
||||
return nil
|
|
@ -24,6 +24,13 @@
|
|||
-- @param #string name
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Node] setPhysicsBody
|
||||
-- @param self
|
||||
-- @param #cc.Component physicsBody
|
||||
-- @return Node#Node self (return value: cc.Node)
|
||||
|
||||
--------------------------------
|
||||
-- Gets the description string. It makes debugging easier.<br>
|
||||
-- return A string<br>
|
||||
|
@ -613,6 +620,12 @@
|
|||
-- @param self
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#Node] getPhysicsBody
|
||||
-- @param self
|
||||
-- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody)
|
||||
|
||||
--------------------------------
|
||||
-- Returns the anchorPoint in absolute pixels.<br>
|
||||
-- warning You can only read it. If you wish to modify it, use anchorPoint instead.<br>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module PhysicsBody
|
||||
-- @extend Ref
|
||||
-- @extend Component
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
|
@ -63,14 +63,15 @@
|
|||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, vec2_table, vec2_table
|
||||
-- @overload self, vec2_table
|
||||
-- @function [parent=#PhysicsBody] applyImpulse
|
||||
-- Applies a immediate force to body.<br>
|
||||
-- param impulse The impulse is applies to this body.<br>
|
||||
-- param offset A Vec2 object, it is the offset from the body’s center of gravity in world coordinates.
|
||||
-- @function [parent=#PhysicsBody] applyImpulse
|
||||
-- @param self
|
||||
-- @param #vec2_table impulse
|
||||
-- @param #vec2_table offset
|
||||
-- @return PhysicsBody#PhysicsBody self (return value: cc.PhysicsBody)
|
||||
|
||||
|
||||
--------------------------------
|
||||
-- set body rotation offset, it's the rotation witch relative to node
|
||||
-- @function [parent=#PhysicsBody] setRotationOffset
|
||||
|
@ -79,14 +80,15 @@
|
|||
-- @return PhysicsBody#PhysicsBody self (return value: cc.PhysicsBody)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, vec2_table, vec2_table
|
||||
-- @overload self, vec2_table
|
||||
-- @function [parent=#PhysicsBody] applyForce
|
||||
-- Applies a continuous force to body.<br>
|
||||
-- param force The force is applies to this body.<br>
|
||||
-- param offset A Vec2 object, it is the offset from the body’s center of gravity in world coordinates.
|
||||
-- @function [parent=#PhysicsBody] applyForce
|
||||
-- @param self
|
||||
-- @param #vec2_table force
|
||||
-- @param #vec2_table offset
|
||||
-- @return PhysicsBody#PhysicsBody self (return value: cc.PhysicsBody)
|
||||
|
||||
|
||||
--------------------------------
|
||||
-- brief Add a shape to body.<br>
|
||||
-- param shape The shape to be added.<br>
|
||||
|
@ -99,7 +101,7 @@
|
|||
-- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape)
|
||||
|
||||
--------------------------------
|
||||
-- Applies a torque force to body. <br>
|
||||
-- Applies a torque force to body.<br>
|
||||
-- param torque The torque is applies to this body.
|
||||
-- @function [parent=#PhysicsBody] applyTorque
|
||||
-- @param self
|
||||
|
@ -194,14 +196,6 @@
|
|||
-- @param self
|
||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||
|
||||
--------------------------------
|
||||
-- Set the enable value.<br>
|
||||
-- If the body it isn't enabled, it will not has simulation by world.
|
||||
-- @function [parent=#PhysicsBody] setEnable
|
||||
-- @param self
|
||||
-- @param #bool enable
|
||||
-- @return PhysicsBody#PhysicsBody self (return value: cc.PhysicsBody)
|
||||
|
||||
--------------------------------
|
||||
-- Set the body is affected by the physics world's gravitational force or not.
|
||||
-- @function [parent=#PhysicsBody] setGravityEnable
|
||||
|
@ -252,13 +246,6 @@
|
|||
-- @param #bool dynamic
|
||||
-- @return PhysicsBody#PhysicsBody self (return value: cc.PhysicsBody)
|
||||
|
||||
--------------------------------
|
||||
-- Get the first shape of the body shapes.<br>
|
||||
-- return The first shape in this body.
|
||||
-- @function [parent=#PhysicsBody] getFirstShape
|
||||
-- @param self
|
||||
-- @return PhysicsShape#PhysicsShape ret (return value: cc.PhysicsShape)
|
||||
|
||||
--------------------------------
|
||||
-- Get the body shapes.<br>
|
||||
-- return A Vector<PhysicsShape*> object contains PhysicsShape pointer.
|
||||
|
@ -288,13 +275,6 @@
|
|||
-- @param #vec2_table point
|
||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||
|
||||
--------------------------------
|
||||
-- Whether the body is enabled.<br>
|
||||
-- If the body it isn't enabled, it will not has simulation by world.
|
||||
-- @function [parent=#PhysicsBody] isEnabled
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @overload self, int, bool
|
||||
-- @overload self, cc.PhysicsShape, bool
|
||||
|
@ -408,7 +388,7 @@
|
|||
-- @return PhysicsBody#PhysicsBody self (return value: cc.PhysicsBody)
|
||||
|
||||
--------------------------------
|
||||
-- get the shape of the body. <br>
|
||||
-- get the shape of the body.<br>
|
||||
-- param tag An interger number that identifies a PhysicsShape object.<br>
|
||||
-- return A PhysicsShape object pointer or nullptr if no shapes were found.
|
||||
-- @function [parent=#PhysicsBody] getShape
|
||||
|
@ -453,7 +433,7 @@
|
|||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- get the sprite the body set to.
|
||||
-- get the node the body set to.
|
||||
-- @function [parent=#PhysicsBody] getNode
|
||||
-- @param self
|
||||
-- @return Node#Node ret (return value: cc.Node)
|
||||
|
@ -472,7 +452,7 @@
|
|||
-- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody)
|
||||
|
||||
--------------------------------
|
||||
-- Create a body contains a EdgeSegment shape. <br>
|
||||
-- Create a body contains a EdgeSegment shape.<br>
|
||||
-- param a It's the edge's begin position.<br>
|
||||
-- param b It's the edge's end position.<br>
|
||||
-- param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.<br>
|
||||
|
@ -497,7 +477,7 @@
|
|||
-- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody)
|
||||
|
||||
--------------------------------
|
||||
-- Create a body contains a EdgeBox shape. <br>
|
||||
-- Create a body contains a EdgeBox shape.<br>
|
||||
-- param size Size contains this box's width and height.<br>
|
||||
-- param material A PhysicsMaterial object, the default value is PHYSICSSHAPE_MATERIAL_DEFAULT.<br>
|
||||
-- param border It's a edge's border width.<br>
|
||||
|
@ -524,4 +504,36 @@
|
|||
-- @param #vec2_table offset
|
||||
-- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody)
|
||||
|
||||
--------------------------------
|
||||
-- Set the enable value.<br>
|
||||
-- If the body it isn't enabled, it will not has simulation by world.
|
||||
-- @function [parent=#PhysicsBody] setEnabled
|
||||
-- @param self
|
||||
-- @param #bool enable
|
||||
-- @return PhysicsBody#PhysicsBody self (return value: cc.PhysicsBody)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#PhysicsBody] onRemove
|
||||
-- @param self
|
||||
-- @return PhysicsBody#PhysicsBody self (return value: cc.PhysicsBody)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#PhysicsBody] onEnter
|
||||
-- @param self
|
||||
-- @return PhysicsBody#PhysicsBody self (return value: cc.PhysicsBody)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#PhysicsBody] onExit
|
||||
-- @param self
|
||||
-- @return PhysicsBody#PhysicsBody self (return value: cc.PhysicsBody)
|
||||
|
||||
--------------------------------
|
||||
--
|
||||
-- @function [parent=#PhysicsBody] onAdd
|
||||
-- @param self
|
||||
-- @return PhysicsBody#PhysicsBody self (return value: cc.PhysicsBody)
|
||||
|
||||
return nil
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module PhysicsManager
|
||||
-- @parent_module cc
|
||||
|
||||
--------------------------------
|
||||
-- Remove a physics component from `PhysiscsManager`. Will remove physics component's physics<br>
|
||||
-- body from the physics world managed by this `PhysicsManager`.
|
||||
-- @function [parent=#PhysicsManager] removePhysicsComponent
|
||||
-- @param self
|
||||
-- @param #cc.ComponentPhysics2d componentPhsics2d
|
||||
-- @return PhysicsManager#PhysicsManager self (return value: cc.PhysicsManager)
|
||||
|
||||
--------------------------------
|
||||
-- Add a physics component to be managed by the `PhysicsManager`. Will register physics <br>
|
||||
-- component's physics body to physics world managed by this `PhysicsManager`.<br>
|
||||
-- param componentPhsics2d The physics component to be managed by this `PhysicsManager`.
|
||||
-- @function [parent=#PhysicsManager] addPhysicsComponent
|
||||
-- @param self
|
||||
-- @param #cc.ComponentPhysics2d componentPhsics2d
|
||||
-- @return PhysicsManager#PhysicsManager self (return value: cc.PhysicsManager)
|
||||
|
||||
--------------------------------
|
||||
-- Get the physics world.<br>
|
||||
-- return Physics world managed by this `PhysicsManager`.
|
||||
-- @function [parent=#PhysicsManager] getPhysicsWorld
|
||||
-- @param self
|
||||
-- @return PhysicsWorld#PhysicsWorld ret (return value: cc.PhysicsWorld)
|
||||
|
||||
--------------------------------
|
||||
-- Create a PhysicsManager with `Scene`. `Scene` will create it automatically,<br>
|
||||
-- so don't create it yourself.<br>
|
||||
-- scene The scene this `PhysicsManager` belongs to.
|
||||
-- @function [parent=#PhysicsManager] PhysicsManager
|
||||
-- @param self
|
||||
-- @param #cc.Scene scene
|
||||
-- @return PhysicsManager#PhysicsManager self (return value: cc.PhysicsManager)
|
||||
|
||||
return nil
|
|
@ -121,7 +121,7 @@
|
|||
|
||||
--------------------------------
|
||||
-- Get the gravity value of this physics world.<br>
|
||||
-- return A Vect object.
|
||||
-- return A Vec2 object.
|
||||
-- @function [parent=#PhysicsWorld] getGravity
|
||||
-- @param self
|
||||
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
||||
|
|
|
@ -151,14 +151,4 @@
|
|||
-- @field [parent=#cc] PhysicsDebugDraw#PhysicsDebugDraw PhysicsDebugDraw preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc ComponentPhysics2d
|
||||
-- @field [parent=#cc] ComponentPhysics2d#ComponentPhysics2d ComponentPhysics2d preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc PhysicsManager
|
||||
-- @field [parent=#cc] PhysicsManager#PhysicsManager PhysicsManager preloaded module
|
||||
|
||||
|
||||
return nil
|
||||
|
|
|
@ -2923,6 +2923,53 @@ int lua_cocos2dx_Component_setEnabled(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Component_onRemove(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Component* 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.Component",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Component*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Component_onRemove'", 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_Component_onRemove'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->onRemove();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Component:onRemove",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Component_onRemove'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Component_setName(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -3020,53 +3067,6 @@ int lua_cocos2dx_Component_isEnabled(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Component_onRemove(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Component* 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.Component",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Component*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Component_onRemove'", 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_Component_onRemove'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->onRemove();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Component:onRemove",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Component_onRemove'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Component_update(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -3211,7 +3211,7 @@ int lua_cocos2dx_Component_init(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Component_onAdd(lua_State* tolua_S)
|
||||
int lua_cocos2dx_Component_setOwner(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Component* cobj = nullptr;
|
||||
|
@ -3231,29 +3231,32 @@ int lua_cocos2dx_Component_onAdd(lua_State* tolua_S)
|
|||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Component_onAdd'", nullptr);
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Component_setOwner'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::Node* arg0;
|
||||
|
||||
ok &= luaval_to_object<cocos2d::Node>(tolua_S, 2, "cc.Node",&arg0, "cc.Component:setOwner");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Component_onAdd'", nullptr);
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Component_setOwner'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->onAdd();
|
||||
cobj->setOwner(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Component:onAdd",argc, 0);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Component:setOwner",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Component_onAdd'.",&tolua_err);
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Component_setOwner'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
@ -3305,7 +3308,7 @@ int lua_cocos2dx_Component_getName(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Component_setOwner(lua_State* tolua_S)
|
||||
int lua_cocos2dx_Component_onAdd(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Component* cobj = nullptr;
|
||||
|
@ -3325,32 +3328,29 @@ int lua_cocos2dx_Component_setOwner(lua_State* tolua_S)
|
|||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Component_setOwner'", nullptr);
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Component_onAdd'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
if (argc == 0)
|
||||
{
|
||||
cocos2d::Node* arg0;
|
||||
|
||||
ok &= luaval_to_object<cocos2d::Node>(tolua_S, 2, "cc.Node",&arg0, "cc.Component:setOwner");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Component_setOwner'", nullptr);
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Component_onAdd'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setOwner(arg0);
|
||||
cobj->onAdd();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Component:setOwner",argc, 1);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Component:onAdd",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Component_setOwner'.",&tolua_err);
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Component_onAdd'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
@ -3402,15 +3402,15 @@ int lua_register_cocos2dx_Component(lua_State* tolua_S)
|
|||
|
||||
tolua_beginmodule(tolua_S,"Component");
|
||||
tolua_function(tolua_S,"setEnabled",lua_cocos2dx_Component_setEnabled);
|
||||
tolua_function(tolua_S,"onRemove",lua_cocos2dx_Component_onRemove);
|
||||
tolua_function(tolua_S,"setName",lua_cocos2dx_Component_setName);
|
||||
tolua_function(tolua_S,"isEnabled",lua_cocos2dx_Component_isEnabled);
|
||||
tolua_function(tolua_S,"onRemove",lua_cocos2dx_Component_onRemove);
|
||||
tolua_function(tolua_S,"update",lua_cocos2dx_Component_update);
|
||||
tolua_function(tolua_S,"getOwner",lua_cocos2dx_Component_getOwner);
|
||||
tolua_function(tolua_S,"init",lua_cocos2dx_Component_init);
|
||||
tolua_function(tolua_S,"onAdd",lua_cocos2dx_Component_onAdd);
|
||||
tolua_function(tolua_S,"getName",lua_cocos2dx_Component_getName);
|
||||
tolua_function(tolua_S,"setOwner",lua_cocos2dx_Component_setOwner);
|
||||
tolua_function(tolua_S,"getName",lua_cocos2dx_Component_getName);
|
||||
tolua_function(tolua_S,"onAdd",lua_cocos2dx_Component_onAdd);
|
||||
tolua_function(tolua_S,"create", lua_cocos2dx_Component_create);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::Component).name();
|
||||
|
@ -3573,6 +3573,56 @@ int lua_cocos2dx_Node_removeComponent(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Node_setPhysicsBody(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_setPhysicsBody'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::Component* arg0;
|
||||
|
||||
ok &= luaval_to_object<cocos2d::Component>(tolua_S, 2, "cc.Component",&arg0, "cc.Node:setPhysicsBody");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Node_setPhysicsBody'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setPhysicsBody(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:setPhysicsBody",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_setPhysicsBody'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Node_getDescription(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -6922,6 +6972,53 @@ int lua_cocos2dx_Node_getRotation(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Node_getPhysicsBody(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::Node* 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.Node",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::Node*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Node_getPhysicsBody'", 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_Node_getPhysicsBody'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::PhysicsBody* ret = cobj->getPhysicsBody();
|
||||
object_to_luaval<cocos2d::PhysicsBody>(tolua_S, "cc.PhysicsBody",(cocos2d::PhysicsBody*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Node:getPhysicsBody",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Node_getPhysicsBody'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_Node_getAnchorPointInPoints(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -10156,6 +10253,7 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"new",lua_cocos2dx_Node_constructor);
|
||||
tolua_function(tolua_S,"addChild",lua_cocos2dx_Node_addChild);
|
||||
tolua_function(tolua_S,"removeComponent",lua_cocos2dx_Node_removeComponent);
|
||||
tolua_function(tolua_S,"setPhysicsBody",lua_cocos2dx_Node_setPhysicsBody);
|
||||
tolua_function(tolua_S,"getDescription",lua_cocos2dx_Node_getDescription);
|
||||
tolua_function(tolua_S,"setRotationSkewY",lua_cocos2dx_Node_setRotationSkewY);
|
||||
tolua_function(tolua_S,"setOpacityModifyRGB",lua_cocos2dx_Node_setOpacityModifyRGB);
|
||||
|
@ -10223,6 +10321,7 @@ int lua_register_cocos2dx_Node(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"runAction",lua_cocos2dx_Node_runAction);
|
||||
tolua_function(tolua_S,"visit",lua_cocos2dx_Node_visit);
|
||||
tolua_function(tolua_S,"getRotation",lua_cocos2dx_Node_getRotation);
|
||||
tolua_function(tolua_S,"getPhysicsBody",lua_cocos2dx_Node_getPhysicsBody);
|
||||
tolua_function(tolua_S,"getAnchorPointInPoints",lua_cocos2dx_Node_getAnchorPointInPoints);
|
||||
tolua_function(tolua_S,"removeChildByName",lua_cocos2dx_Node_removeChildByName);
|
||||
tolua_function(tolua_S,"getGLProgramState",lua_cocos2dx_Node_getGLProgramState);
|
||||
|
|
|
@ -2127,6 +2127,8 @@ int register_all_cocos2dx(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2896,51 +2896,59 @@ int lua_cocos2dx_physics_PhysicsBody_applyImpulse(lua_State* tolua_S)
|
|||
int argc = 0;
|
||||
cocos2d::PhysicsBody* 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.PhysicsBody",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::PhysicsBody*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics_PhysicsBody_applyImpulse'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
do{
|
||||
if (argc == 2) {
|
||||
cocos2d::Vec2 arg0;
|
||||
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.PhysicsBody:applyImpulse");
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::Vec2 arg0;
|
||||
|
||||
if (!ok) { break; }
|
||||
cocos2d::Vec2 arg1;
|
||||
ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.PhysicsBody:applyImpulse");
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj->applyImpulse(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.PhysicsBody:applyImpulse");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics_PhysicsBody_applyImpulse'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
do{
|
||||
if (argc == 1) {
|
||||
cocos2d::Vec2 arg0;
|
||||
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.PhysicsBody:applyImpulse");
|
||||
cobj->applyImpulse(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
if (argc == 2)
|
||||
{
|
||||
cocos2d::Vec2 arg0;
|
||||
cocos2d::Vec2 arg1;
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj->applyImpulse(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.PhysicsBody:applyImpulse");
|
||||
|
||||
ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.PhysicsBody:applyImpulse");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics_PhysicsBody_applyImpulse'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsBody:applyImpulse",argc, 1);
|
||||
cobj->applyImpulse(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsBody:applyImpulse",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
|
@ -3005,51 +3013,59 @@ int lua_cocos2dx_physics_PhysicsBody_applyForce(lua_State* tolua_S)
|
|||
int argc = 0;
|
||||
cocos2d::PhysicsBody* 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.PhysicsBody",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::PhysicsBody*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics_PhysicsBody_applyForce'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
do{
|
||||
if (argc == 2) {
|
||||
cocos2d::Vec2 arg0;
|
||||
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.PhysicsBody:applyForce");
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::Vec2 arg0;
|
||||
|
||||
if (!ok) { break; }
|
||||
cocos2d::Vec2 arg1;
|
||||
ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.PhysicsBody:applyForce");
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj->applyForce(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.PhysicsBody:applyForce");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics_PhysicsBody_applyForce'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
do{
|
||||
if (argc == 1) {
|
||||
cocos2d::Vec2 arg0;
|
||||
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.PhysicsBody:applyForce");
|
||||
cobj->applyForce(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
if (argc == 2)
|
||||
{
|
||||
cocos2d::Vec2 arg0;
|
||||
cocos2d::Vec2 arg1;
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj->applyForce(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "cc.PhysicsBody:applyForce");
|
||||
|
||||
ok &= luaval_to_vec2(tolua_S, 3, &arg1, "cc.PhysicsBody:applyForce");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics_PhysicsBody_applyForce'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsBody:applyForce",argc, 1);
|
||||
cobj->applyForce(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsBody:applyForce",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
|
@ -3816,56 +3832,6 @@ int lua_cocos2dx_physics_PhysicsBody_getPosition(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_physics_PhysicsBody_setEnable(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::PhysicsBody* 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.PhysicsBody",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::PhysicsBody*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics_PhysicsBody_setEnable'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.PhysicsBody:setEnable");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics_PhysicsBody_setEnable'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setEnable(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsBody:setEnable",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics_PhysicsBody_setEnable'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_physics_PhysicsBody_setGravityEnable(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -4207,53 +4173,6 @@ int lua_cocos2dx_physics_PhysicsBody_setDynamic(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_physics_PhysicsBody_getFirstShape(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::PhysicsBody* 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.PhysicsBody",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::PhysicsBody*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics_PhysicsBody_getFirstShape'", 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_physics_PhysicsBody_getFirstShape'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::PhysicsShape* ret = cobj->getFirstShape();
|
||||
object_to_luaval<cocos2d::PhysicsShape>(tolua_S, "cc.PhysicsShape",(cocos2d::PhysicsShape*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsBody:getFirstShape",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics_PhysicsBody_getFirstShape'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_physics_PhysicsBody_getShapes(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -4448,53 +4367,6 @@ int lua_cocos2dx_physics_PhysicsBody_world2Local(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_physics_PhysicsBody_isEnabled(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::PhysicsBody* 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.PhysicsBody",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::PhysicsBody*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics_PhysicsBody_isEnabled'", 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_physics_PhysicsBody_isEnabled'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->isEnabled();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsBody:isEnabled",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics_PhysicsBody_isEnabled'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_physics_PhysicsBody_removeShape(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -5928,7 +5800,7 @@ static int lua_cocos2dx_physics_PhysicsBody_finalize(lua_State* tolua_S)
|
|||
int lua_register_cocos2dx_physics_PhysicsBody(lua_State* tolua_S)
|
||||
{
|
||||
tolua_usertype(tolua_S,"cc.PhysicsBody");
|
||||
tolua_cclass(tolua_S,"PhysicsBody","cc.PhysicsBody","cc.Ref",nullptr);
|
||||
tolua_cclass(tolua_S,"PhysicsBody","cc.PhysicsBody","cc.Component",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"PhysicsBody");
|
||||
tolua_function(tolua_S,"isGravityEnabled",lua_cocos2dx_physics_PhysicsBody_isGravityEnabled);
|
||||
|
@ -5958,7 +5830,6 @@ int lua_register_cocos2dx_physics_PhysicsBody(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"getWorld",lua_cocos2dx_physics_PhysicsBody_getWorld);
|
||||
tolua_function(tolua_S,"getAngularVelocity",lua_cocos2dx_physics_PhysicsBody_getAngularVelocity);
|
||||
tolua_function(tolua_S,"getPosition",lua_cocos2dx_physics_PhysicsBody_getPosition);
|
||||
tolua_function(tolua_S,"setEnable",lua_cocos2dx_physics_PhysicsBody_setEnable);
|
||||
tolua_function(tolua_S,"setGravityEnable",lua_cocos2dx_physics_PhysicsBody_setGravityEnable);
|
||||
tolua_function(tolua_S,"getGroup",lua_cocos2dx_physics_PhysicsBody_getGroup);
|
||||
tolua_function(tolua_S,"setMoment",lua_cocos2dx_physics_PhysicsBody_setMoment);
|
||||
|
@ -5966,12 +5837,10 @@ int lua_register_cocos2dx_physics_PhysicsBody(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"local2World",lua_cocos2dx_physics_PhysicsBody_local2World);
|
||||
tolua_function(tolua_S,"getCategoryBitmask",lua_cocos2dx_physics_PhysicsBody_getCategoryBitmask);
|
||||
tolua_function(tolua_S,"setDynamic",lua_cocos2dx_physics_PhysicsBody_setDynamic);
|
||||
tolua_function(tolua_S,"getFirstShape",lua_cocos2dx_physics_PhysicsBody_getFirstShape);
|
||||
tolua_function(tolua_S,"getShapes",lua_cocos2dx_physics_PhysicsBody_getShapes);
|
||||
tolua_function(tolua_S,"getContactTestBitmask",lua_cocos2dx_physics_PhysicsBody_getContactTestBitmask);
|
||||
tolua_function(tolua_S,"setAngularVelocity",lua_cocos2dx_physics_PhysicsBody_setAngularVelocity);
|
||||
tolua_function(tolua_S,"world2Local",lua_cocos2dx_physics_PhysicsBody_world2Local);
|
||||
tolua_function(tolua_S,"isEnabled",lua_cocos2dx_physics_PhysicsBody_isEnabled);
|
||||
tolua_function(tolua_S,"removeShape",lua_cocos2dx_physics_PhysicsBody_removeShape);
|
||||
tolua_function(tolua_S,"setMass",lua_cocos2dx_physics_PhysicsBody_setMass);
|
||||
tolua_function(tolua_S,"addMoment",lua_cocos2dx_physics_PhysicsBody_addMoment);
|
||||
|
@ -12611,425 +12480,6 @@ int lua_register_cocos2dx_physics_PhysicsDebugDraw(lua_State* tolua_S)
|
|||
g_typeCast["PhysicsDebugDraw"] = "cc.PhysicsDebugDraw";
|
||||
return 1;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_physics_ComponentPhysics2d_setPhysicsBody(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ComponentPhysics2d* 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.ComponentPhysics2d",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ComponentPhysics2d*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics_ComponentPhysics2d_setPhysicsBody'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::PhysicsBody* arg0;
|
||||
|
||||
ok &= luaval_to_object<cocos2d::PhysicsBody>(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.ComponentPhysics2d:setPhysicsBody");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics_ComponentPhysics2d_setPhysicsBody'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setPhysicsBody(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ComponentPhysics2d:setPhysicsBody",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics_ComponentPhysics2d_setPhysicsBody'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_physics_ComponentPhysics2d_getPhysicsBody(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ComponentPhysics2d* 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.ComponentPhysics2d",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ComponentPhysics2d*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics_ComponentPhysics2d_getPhysicsBody'", 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_physics_ComponentPhysics2d_getPhysicsBody'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::PhysicsBody* ret = cobj->getPhysicsBody();
|
||||
object_to_luaval<cocos2d::PhysicsBody>(tolua_S, "cc.PhysicsBody",(cocos2d::PhysicsBody*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ComponentPhysics2d:getPhysicsBody",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics_ComponentPhysics2d_getPhysicsBody'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_physics_ComponentPhysics2d_create(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.ComponentPhysics2d",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
|
||||
do
|
||||
{
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::PhysicsBody* arg0;
|
||||
ok &= luaval_to_object<cocos2d::PhysicsBody>(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.ComponentPhysics2d:create");
|
||||
if (!ok) { break; }
|
||||
cocos2d::ComponentPhysics2d* ret = cocos2d::ComponentPhysics2d::create(arg0);
|
||||
object_to_luaval<cocos2d::ComponentPhysics2d>(tolua_S, "cc.ComponentPhysics2d",(cocos2d::ComponentPhysics2d*)ret);
|
||||
return 1;
|
||||
}
|
||||
} while (0);
|
||||
ok = true;
|
||||
do
|
||||
{
|
||||
if (argc == 0)
|
||||
{
|
||||
cocos2d::ComponentPhysics2d* ret = cocos2d::ComponentPhysics2d::create();
|
||||
object_to_luaval<cocos2d::ComponentPhysics2d>(tolua_S, "cc.ComponentPhysics2d",(cocos2d::ComponentPhysics2d*)ret);
|
||||
return 1;
|
||||
}
|
||||
} while (0);
|
||||
ok = true;
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.ComponentPhysics2d:create",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics_ComponentPhysics2d_create'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_physics_ComponentPhysics2d_constructor(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ComponentPhysics2d* cobj = nullptr;
|
||||
bool ok = true;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
do{
|
||||
if (argc == 1) {
|
||||
cocos2d::PhysicsBody* arg0;
|
||||
ok &= luaval_to_object<cocos2d::PhysicsBody>(tolua_S, 2, "cc.PhysicsBody",&arg0, "cc.ComponentPhysics2d:ComponentPhysics2d");
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj = new cocos2d::ComponentPhysics2d(arg0);
|
||||
cobj->autorelease();
|
||||
int ID = (int)cobj->_ID ;
|
||||
int* luaID = &cobj->_luaID ;
|
||||
toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.ComponentPhysics2d");
|
||||
return 1;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
do{
|
||||
if (argc == 0) {
|
||||
cobj = new cocos2d::ComponentPhysics2d();
|
||||
cobj->autorelease();
|
||||
int ID = (int)cobj->_ID ;
|
||||
int* luaID = &cobj->_luaID ;
|
||||
toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.ComponentPhysics2d");
|
||||
return 1;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.ComponentPhysics2d:ComponentPhysics2d",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics_ComponentPhysics2d_constructor'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lua_cocos2dx_physics_ComponentPhysics2d_finalize(lua_State* tolua_S)
|
||||
{
|
||||
printf("luabindings: finalizing LUA object (ComponentPhysics2d)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_register_cocos2dx_physics_ComponentPhysics2d(lua_State* tolua_S)
|
||||
{
|
||||
tolua_usertype(tolua_S,"cc.ComponentPhysics2d");
|
||||
tolua_cclass(tolua_S,"ComponentPhysics2d","cc.ComponentPhysics2d","cc.Component",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"ComponentPhysics2d");
|
||||
tolua_function(tolua_S,"new",lua_cocos2dx_physics_ComponentPhysics2d_constructor);
|
||||
tolua_function(tolua_S,"setPhysicsBody",lua_cocos2dx_physics_ComponentPhysics2d_setPhysicsBody);
|
||||
tolua_function(tolua_S,"getPhysicsBody",lua_cocos2dx_physics_ComponentPhysics2d_getPhysicsBody);
|
||||
tolua_function(tolua_S,"create", lua_cocos2dx_physics_ComponentPhysics2d_create);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::ComponentPhysics2d).name();
|
||||
g_luaType[typeName] = "cc.ComponentPhysics2d";
|
||||
g_typeCast["ComponentPhysics2d"] = "cc.ComponentPhysics2d";
|
||||
return 1;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_physics_PhysicsManager_removePhysicsComponent(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::PhysicsManager* 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.PhysicsManager",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::PhysicsManager*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics_PhysicsManager_removePhysicsComponent'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::ComponentPhysics2d* arg0;
|
||||
|
||||
ok &= luaval_to_object<cocos2d::ComponentPhysics2d>(tolua_S, 2, "cc.ComponentPhysics2d",&arg0, "cc.PhysicsManager:removePhysicsComponent");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics_PhysicsManager_removePhysicsComponent'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->removePhysicsComponent(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsManager:removePhysicsComponent",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics_PhysicsManager_removePhysicsComponent'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_physics_PhysicsManager_addPhysicsComponent(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::PhysicsManager* 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.PhysicsManager",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::PhysicsManager*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics_PhysicsManager_addPhysicsComponent'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::ComponentPhysics2d* arg0;
|
||||
|
||||
ok &= luaval_to_object<cocos2d::ComponentPhysics2d>(tolua_S, 2, "cc.ComponentPhysics2d",&arg0, "cc.PhysicsManager:addPhysicsComponent");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics_PhysicsManager_addPhysicsComponent'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->addPhysicsComponent(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsManager:addPhysicsComponent",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics_PhysicsManager_addPhysicsComponent'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_physics_PhysicsManager_getPhysicsWorld(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::PhysicsManager* 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.PhysicsManager",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::PhysicsManager*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_physics_PhysicsManager_getPhysicsWorld'", 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_physics_PhysicsManager_getPhysicsWorld'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::PhysicsWorld* ret = cobj->getPhysicsWorld();
|
||||
object_to_luaval<cocos2d::PhysicsWorld>(tolua_S, "cc.PhysicsWorld",(cocos2d::PhysicsWorld*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsManager:getPhysicsWorld",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics_PhysicsManager_getPhysicsWorld'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_physics_PhysicsManager_constructor(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::PhysicsManager* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::Scene* arg0;
|
||||
|
||||
ok &= luaval_to_object<cocos2d::Scene>(tolua_S, 2, "cc.Scene",&arg0, "cc.PhysicsManager:PhysicsManager");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_physics_PhysicsManager_constructor'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj = new cocos2d::PhysicsManager(arg0);
|
||||
tolua_pushusertype(tolua_S,(void*)cobj,"cc.PhysicsManager");
|
||||
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.PhysicsManager:PhysicsManager",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_physics_PhysicsManager_constructor'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lua_cocos2dx_physics_PhysicsManager_finalize(lua_State* tolua_S)
|
||||
{
|
||||
printf("luabindings: finalizing LUA object (PhysicsManager)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_register_cocos2dx_physics_PhysicsManager(lua_State* tolua_S)
|
||||
{
|
||||
tolua_usertype(tolua_S,"cc.PhysicsManager");
|
||||
tolua_cclass(tolua_S,"PhysicsManager","cc.PhysicsManager","",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"PhysicsManager");
|
||||
tolua_function(tolua_S,"new",lua_cocos2dx_physics_PhysicsManager_constructor);
|
||||
tolua_function(tolua_S,"removePhysicsComponent",lua_cocos2dx_physics_PhysicsManager_removePhysicsComponent);
|
||||
tolua_function(tolua_S,"addPhysicsComponent",lua_cocos2dx_physics_PhysicsManager_addPhysicsComponent);
|
||||
tolua_function(tolua_S,"getPhysicsWorld",lua_cocos2dx_physics_PhysicsManager_getPhysicsWorld);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::PhysicsManager).name();
|
||||
g_luaType[typeName] = "cc.PhysicsManager";
|
||||
g_typeCast["PhysicsManager"] = "cc.PhysicsManager";
|
||||
return 1;
|
||||
}
|
||||
TOLUA_API int register_all_cocos2dx_physics(lua_State* tolua_S)
|
||||
{
|
||||
tolua_open(tolua_S);
|
||||
|
@ -13047,7 +12497,6 @@ TOLUA_API int register_all_cocos2dx_physics(lua_State* tolua_S)
|
|||
lua_register_cocos2dx_physics_PhysicsShape(tolua_S);
|
||||
lua_register_cocos2dx_physics_PhysicsShapePolygon(tolua_S);
|
||||
lua_register_cocos2dx_physics_PhysicsShapeBox(tolua_S);
|
||||
lua_register_cocos2dx_physics_PhysicsManager(tolua_S);
|
||||
lua_register_cocos2dx_physics_PhysicsJointMotor(tolua_S);
|
||||
lua_register_cocos2dx_physics_PhysicsJointRatchet(tolua_S);
|
||||
lua_register_cocos2dx_physics_PhysicsJointDistance(tolua_S);
|
||||
|
@ -13056,7 +12505,6 @@ TOLUA_API int register_all_cocos2dx_physics(lua_State* tolua_S)
|
|||
lua_register_cocos2dx_physics_PhysicsJointPin(tolua_S);
|
||||
lua_register_cocos2dx_physics_PhysicsContactPreSolve(tolua_S);
|
||||
lua_register_cocos2dx_physics_PhysicsDebugDraw(tolua_S);
|
||||
lua_register_cocos2dx_physics_ComponentPhysics2d(tolua_S);
|
||||
lua_register_cocos2dx_physics_PhysicsShapeEdgeChain(tolua_S);
|
||||
lua_register_cocos2dx_physics_PhysicsShapeEdgeSegment(tolua_S);
|
||||
lua_register_cocos2dx_physics_PhysicsJointGear(tolua_S);
|
||||
|
|
|
@ -264,19 +264,6 @@ int register_all_cocos2dx_physics(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue