Add collision function to entities to check collisions