//----------------------------------------------------------------------
        // Static methods
        //----------------------------------------------------------------------
        public static void Collide(GameObject pSafeTreeA, GameObject pSafeTreeB)
        {
            // treeA vs treeB
            GameObject pNodeA = pSafeTreeA;
            GameObject pNodeB = pSafeTreeB;

            while (pNodeA != null)
            {
                // restart compare
                pNodeB = pSafeTreeB;

                while (pNodeB != null)
                {
                    //Debug.WriteLine("ColPair:    test:  {0}, {1}", pNodeA.getName(), pNodeB.getName());

                    // get rectangles
                    CollisionRect rectA = pNodeA.poCollisionObject.poCollisionRect;
                    CollisionRect rectB = pNodeB.poCollisionObject.poCollisionRect;

                    if (CollisionRect.Intersect(rectA, rectB))
                    {
                        // when rectA and rectB are intersected
                        pNodeA.accept(pNodeB);
                        break;
                    }

                    pNodeB = (GameObject)Iterator.GetSibling(pNodeB);
                }

                pNodeA = (GameObject)Iterator.GetSibling(pNodeA);
            }
        }