cc.find(“UI_ROOT/throw_button”).setLocalZOrder(2)
setLocalZOrder已经移除了
直接用zindex吧
怎么使用?请给个实例,谢谢!

把节点的zIndex设置高一点
cc.find(“UI_ROOT/rope”).setLocalZOrder(100);
cc.find(“UI_ROOT/throw_button”).setLocalZOrder(250);
我是想把这2个节点调高
这个zIndex和之前的setLocalZOrder是一样的,都是设置节点z层级
cc.find(“UI_ROOT/rope”).zIndex(100);
cc.find(“UI_ROOT/throw_button”).zIndex(250);
这么写对吗?
可以的
只要节点获取是正确的
node.zIndex = 200
cc.find(“UI_ROOT/rope”).zIndex(100);
cc.find(“UI_ROOT/throw_button”).zIndex(200);
一运行 就错误
cc.find(“UI_ROOT/rope”).zIndex =100;
cc.find(“UI_ROOT/throw_button”).zIndex =200;
谢谢 可以了