示例#1
0
    void DoCheckCollision()
    {
        if (collisionEvent == null)
        {
            return;
        }

        GameObject[] colliderGameObjects = QuadtreeObject.CheckCollision(_leaf);
        foreach (GameObject colliderGameObject in colliderGameObjects)
        {
            if (collisionEvent == null)
            {
                break;
            }
            collisionEvent(colliderGameObject);
        }
    }
示例#2
0
 private void OnDisable()
 {
     QuadtreeObject.RemoveLeaf(_leaf);
 }
示例#3
0
 private void OnEnable()
 {
     UpdateLeaf();
     QuadtreeObject.SetLeaf(_leaf);
 }