void CObjectBase::update(float dt) { CCArray* children = getChildren(); CCObject* pObj; CCARRAY_FOREACH(children, pObj) { pObj->update(dt); }
bool CCSceneBase::updateScene(const CCTime &time) { bool updated = false; for( int i=0; i<objects.length; ++i ) { CCObject *object = objects.list[i]; if( object->isActive() ) { updated |= object->update( time ); } else if( object->deleteMe > 0 ) { if( --object->deleteMe == 0 ) { DELETE_OBJECT( object ); --i; } } } return updated; }