Added collision detection for the sprites