COCOS-GETchildbyname
2016-06-27 18:40
459 查看
local child = _node:getChildByName(_name)
-- print("find" .. _name .. "in" .. _node:getName())
if child then
return child
else
local children = _node:getChildren()
for i=1, #children do
child = ToolKit:getOnlyChildByName(children[i], _name)
if child then
return child
end
end
return nil
end
-- print("find" .. _name .. "in" .. _node:getName())
if child then
return child
else
local children = _node:getChildren()
for i=1, #children do
child = ToolKit:getOnlyChildByName(children[i], _name)
if child then
return child
end
end
return nil
end
相关文章推荐
- cocos-2dx-getChildByTag
- Cocos2d-x 3.x版本中SAX 解析 XML
- Cocos studio v3.10记录(一)
- cocos2dx3.X shader使图片置灰
- cocos prigressBar
- cocos2d lua 上下翻牌
- 关于cocos2dx客户端程序的自动更新解决方案
- cocos2dx解决苹果正版ipv6的问题
- 学习笔记-----cocos2d-x加载cocostudio进度条
- cocos2d-x 常见问题
- 制作时钟cocos3.0
- cocos2dx int to string的几种方法
- cocos2dx-详细剖析lua(如何与lua集成,如何导出lua api,如何与lua交互)
- cocos2d-x位图字体生成工具bmfont使用图文教程 美术字使用
- 如何在Cocos2d-x中集成安卓版微信SDK
- VS2012运行最新版本的Cocos3.10出现的Bug
- cocos lua -字符串匹配规则。
- cocos2dx-内存管理剖析(智能指针的局限与引用计数的选择)
- CVP认证学习笔记--李天宇010节点的计划任务
- CVP认证学习笔记--李天宇009节点的缩放和旋转