* add CCNode::getChildrenCount()

This commit is contained in:
YuLei Liao 2012-01-21 01:29:41 +08:00
parent 279e915b55
commit f8dafe6712
2 changed files with 7 additions and 0 deletions

View File

@ -319,6 +319,11 @@ CCArray* CCNode::getChildren()
return m_pChildren; return m_pChildren;
} }
unsigned int CCNode::getChildrenCount(void)
{
return m_pChildren ? m_pChildren->count() : 0;
}
/// camera getter: lazy alloc /// camera getter: lazy alloc
CCCamera* CCNode::getCamera() CCCamera* CCNode::getCamera()
{ {

View File

@ -191,6 +191,8 @@ class CC_DLL CCNode : public SelectorProtocol, public CCObject
CC_PROPERTY_READONLY(CCArray*, m_pChildren, Children) CC_PROPERTY_READONLY(CCArray*, m_pChildren, Children)
unsigned int getChildrenCount(void);
/** A CCCamera object that lets you move the node using a gluLookAt /** A CCCamera object that lets you move the node using a gluLookAt
*/ */
CC_PROPERTY_READONLY(CCCamera *, m_pCamera, Camera) CC_PROPERTY_READONLY(CCCamera *, m_pCamera, Camera)