Mine
public text v1 · immutablemSprites.SortYInsertion();
if(ball.YVelocity < 0)
{
// Ball is moving down, so forward loop to
// check top to bottom.
for( int i = 0; i < mSprites.Count; i++)
{
PreformSpriteCollision(mSprites[i]);
if (!start)
break;
}
}
else
{
// Ball is moving up, so reverse loop to
// check bottom to top.
for( int i = mSprites.Count - 1; i > - 1; i--)
{
PreformSpriteCollision(mSprites[i]);
if (!start)
break;
}
}