#else
bool collision = false;
- for(int i=0; i<(int)objects.size(); i++)
+ // NOTE that this deletes the object on mouse down instead of mouse up. Have to
+ // check to see how it feels to do it that way...
+ if (deleteActive)
+ {
+ for(int i=0; i<(int)objects.size(); i++)
+ {
+ if (objects[i]->Collided(point))
+ {
+ objects.erase(objects.begin() + i); // Calls the destructor, (deletes the object, I presume... O_o)
+ break;
+ }
+ }
+ }
+ else
{
- if (objects[i]->Collided(point))
- collision = true;
+ for(int i=0; i<(int)objects.size(); i++)
+ {
+ if (objects[i]->Collided(point))
+ collision = true;
+ }
}
#endif
- // Do we decouple the state of the generic container from the objects inside???
+ // Do we decouple the state of the generic container from the objects inside??? Mebbe.
state = OSInactive;
// return false;
return collision;