copyWith method

CollisionData copyWith({
  1. Vector2? normal,
  2. double? depth,
  3. Direction? direction,
  4. List<Vector2>? intersectionPoints,
})

Implementation

CollisionData copyWith({
  Vector2? normal,
  double? depth,
  Direction? direction,
  List<Vector2>? intersectionPoints,
}) {
  return CollisionData(
    normal: normal ?? this.normal,
    depth: depth ?? this.depth,
    direction: direction ?? this.direction,
    intersectionPoints: intersectionPoints ?? this.intersectionPoints,
  );
}