void DoCheckCollision() { if (collisionEvent == null) { return; } GameObject[] colliderGameObjects = QuadtreeObject.CheckCollision(_leaf); foreach (GameObject colliderGameObject in colliderGameObjects) { if (collisionEvent == null) { break; } collisionEvent(colliderGameObject); } }
private void OnDisable() { QuadtreeObject.RemoveLeaf(_leaf); }
private void OnEnable() { UpdateLeaf(); QuadtreeObject.SetLeaf(_leaf); }