private void ProcessCollisionEvents()
{
if (this.isProcessingEvents) return;
this.isProcessingEvents = true;
{
// Don't use foreach here in case someone decides to add something at the end while iterating..
for (int i = 0; i < this.eventBuffer.Count; i++)
{
this.ProcessSingleCollisionEvent(this.eventBuffer[i]);
}
this.eventBuffer.Clear();
}
this.isProcessingEvents = false;
}