Move code for checking whether two objects is colliding as separate method per object