mirror of https://github.com/axmolengine/axmol.git
issue #5 : add description to CCNode
This commit is contained in:
parent
df8150582c
commit
8eff6998dd
|
@ -83,7 +83,7 @@ void CCNode::arrayMakeObjectsPerformSelector(NSMutableArray * pArray, callbackFu
|
|||
{
|
||||
pNode = static_cast<CCNode*>(*it);
|
||||
|
||||
if(pNode)
|
||||
if(pNode && func)
|
||||
{
|
||||
(pNode->*func)();
|
||||
}
|
||||
|
@ -398,12 +398,15 @@ void CCNode::cleanup()
|
|||
arrayMakeObjectsPerformSelector(m_pChildren, &CCNode::cleanup);
|
||||
}
|
||||
|
||||
/** @todo no declare in class
|
||||
- (NSString*) description
|
||||
|
||||
std::string CCNode::description()
|
||||
{
|
||||
return [NSString stringWithFormat:@"<%@ = %08X | Tag = %i>", [self class], self, tag_];
|
||||
char des[100];
|
||||
sprintf_s(des, 100, "<CCNode | Tag = %i>", m_nTag);
|
||||
string ret(des);
|
||||
|
||||
return ret;
|
||||
}
|
||||
*/
|
||||
|
||||
// lazy allocs
|
||||
void CCNode::childrenAlloc(void)
|
||||
|
|
|
@ -215,6 +215,8 @@ public:
|
|||
|
||||
virtual ~CCNode();
|
||||
|
||||
std::string description(void);
|
||||
|
||||
/** allocates and initializes a node.
|
||||
The node will be created as "autorelease".
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue