Esempio n. 1
0
void CObjectBase::update(float dt)
{
    CCArray* children = getChildren();
    CCObject* pObj;
    CCARRAY_FOREACH(children, pObj)
    {
        pObj->update(dt);
    }
Esempio n. 2
0
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;
}