add method

  1. @override
void add(
  1. ShapeHitbox item
)
override

Adds an item to the broadphase. Should be called in a CollisionDetection class while adding a hitbox into its collision detection system.

Implementation

@override
void add(ShapeHitbox item) {
  tree.add(item);
  if (item.collisionType == CollisionType.active) {
    activeHitboxes.add(item);
  }
  _cacheCenterOfHitbox(item);
}