well documented CCNode

This commit is contained in:
walzer 2013-01-17 11:20:25 +08:00
parent cc2865e294
commit 7b16494862
2 changed files with 1057 additions and 499 deletions

View File

@ -282,37 +282,12 @@ void CCNode::setPosition(const CCPoint& newPosition)
m_bTransformDirty = m_bInverseDirty = true;
}
const CCPoint& CCNode::getPositionLua(void)
{
return m_obPosition;
}
void CCNode::getPosition(float* x, float* y)
{
*x = m_obPosition.x;
*y = m_obPosition.y;
}
float CCNode::getPositionX(void)
{
return m_obPosition.x;
}
float CCNode::getPositionY(void)
{
return m_obPosition.y;
}
void CCNode::setPositionX(float x)
{
setPosition(ccp(x, m_obPosition.y));
}
void CCNode::setPositionY(float y)
{
setPosition(ccp(m_obPosition.x, y));
}
void CCNode::setPosition(float x, float y)
{
setPosition(ccp(x, y));
@ -929,9 +904,7 @@ void CCNode::onExit()
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeNodeEvent(this, kCCNodeOnExit);
}
arrayMakeObjectsPerformSelector(m_pChildren, onExit, CCNode*);
arrayMakeObjectsPerformSelector(m_pChildren, onExit, CCNode*);
}
void CCNode::registerScriptHandler(int nHandler)
@ -951,13 +924,6 @@ void CCNode::unregisterScriptHandler(void)
}
}
void CCNode::scheduleUpdateWithPriorityLua(int nHandler, int priority)
{
unscheduleUpdate();
m_nUpdateScriptHandler = nHandler;
m_pScheduler->scheduleUpdateForTarget(this, priority, !m_bRunning);
}
void CCNode::setActionManager(CCActionManager* actionManager)
{
if( actionManager != m_pActionManager ) {
@ -1034,6 +1000,13 @@ void CCNode::scheduleUpdateWithPriority(int priority)
m_pScheduler->scheduleUpdateForTarget(this, priority, !m_bRunning);
}
void CCNode::scheduleUpdateWithPriorityLua(int nHandler, int priority)
{
unscheduleUpdate();
m_nUpdateScriptHandler = nHandler;
m_pScheduler->scheduleUpdateForTarget(this, priority, !m_bRunning);
}
void CCNode::unscheduleUpdate()
{
m_pScheduler->unscheduleUpdateForTarget(this);
@ -1239,11 +1212,11 @@ CCPoint CCNode::convertTouchToNodeSpaceAR(CCTouch *touch)
return this->convertToNodeSpaceAR(point);
}
// MARMALADE ADDED
void CCNode::updateTransform()
{
// Recursively iterate over children
arrayMakeObjectsPerformSelector(m_pChildren, updateTransform, CCNode*);
}
NS_CC_END

File diff suppressed because it is too large Load Diff