本文整理汇总了C++中SkeletonRenderer::setDebugBonesEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ SkeletonRenderer::setDebugBonesEnabled方法的具体用法?C++ SkeletonRenderer::setDebugBonesEnabled怎么用?C++ SkeletonRenderer::setDebugBonesEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkeletonRenderer
的用法示例。
在下文中一共展示了SkeletonRenderer::setDebugBonesEnabled方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: jsb_cocos2dx_spine_setDebugBones
bool jsb_cocos2dx_spine_setDebugBones(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JSObject *obj = JS_THIS_OBJECT(cx, vp);
js_proxy_t *proxy = jsb_get_js_proxy(obj);
SkeletonRenderer* cobj = (SkeletonRenderer *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "Invalid Native Object");
if (argc == 1) {
bool enable = args.get(0).toBoolean();
cobj->setDebugBonesEnabled(enable);
args.rval().setUndefined();
return true;
}
JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1);
return false;
}
示例2: jsb_cocos2dx_spine_setDebugBones
bool jsb_cocos2dx_spine_setDebugBones(JSContext *cx, uint32_t argc, jsval *vp)
{
jsval *argv = JS_ARGV(cx, vp);
JSObject *obj = JS_THIS_OBJECT(cx, vp);
js_proxy_t *proxy = jsb_get_js_proxy(obj);
SkeletonRenderer* cobj = (SkeletonRenderer *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "Invalid Native Object");
if (argc == 1) {
bool enable = JSVAL_TO_BOOLEAN(argv[0]);
cobj->setDebugBonesEnabled(enable);
JS_SET_RVAL(cx, vp, JSVAL_NULL);
return true;
}
JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1);
return false;
}