All pastes #372649 Raw Edit

Unnamed

public text v1 · immutable
#372649 ·published 2007-02-26 06:16 UTC
rendered paste body
Object* Level::PickUp(const float x, const float y)
{
    Object* temp;
    
    for(std::vector<Object*>::iterator obj = this -> objects.begin();
        obj != this -> objects.end(); ++obj );
    {
        temp = *obj;
        
        if( temp != NULL && temp -> Grabbable() && temp -> PointInside( x , y ) )
        {
            this -> objects.erase(obj);
            return temp;
        }
    }
    
    return NULL;
}