Пример #1
0
    public void clear()
    {
        // is it a leaf?
        if (level == QuadTreeTouchEvent.DEEP_LEVEL_THRESHOLD)
        {
            leafContent.clear();
            return;
        }

        // while not being a leaf then continue cleaning quad nodes
        if (topLeft != null)
        {
            topLeft.clear();
        }
        if (topRight != null)
        {
            topRight.clear();
        }
        if (botRight != null)
        {
            botRight.clear();
        }
        if (botLeft != null)
        {
            botLeft.clear();
        }
    }
Пример #2
0
    void OnApplicationQuit()
    {
        dynamicListeners.clear();
        staticQuadTree.clear();
#if UNITY_EDITOR
#else
        // NOTE: to avoid !IsPlayingOrAllowExecuteInEditMode error in console
        instance = null;
#endif
    }