remove method

void remove(
  1. T hitbox, {
  2. bool keepOldPosition = false,
})

Implementation

void remove(T hitbox, {bool keepOldPosition = false}) {
  final node = _hitboxAtNode.remove(hitbox as ShapeHitbox);
  if (node != null) {
    node.hitboxes.remove(hitbox);
    if (!keepOldPosition) {
      _oldPositionByItem.remove(hitbox as ShapeHitbox);
    }
  }
}