Created a constructor for CollisionConstactListener.