Unnamed
public text v1 · immutableObject* 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;
}