Exemplo n.º 1
0
        public void log()
        {
            string s = "";
            int    i = 0;

            while (i <= curDepth)
            {
                s += "\t";
                i++;
            }
            //Debug.LogWarning(s + rect.ToString());

            foreach (GameObject gameObject in goDic.Values)
            {
                Debug.LogWarning(s + "gameObject = " + gameObject + ", p = " + gameObject.transform.position);
            }

            if (node0 == null)
            {
                return;
            }

            node0.log();
            node1.log();
            node2.log();
            node3.log();
        }
Exemplo n.º 2
0
        // Use this for initialization
        void Start()
        {
            Tree4 tree4Root = new Tree4(new Rect(-50, -50, 100, 100), 0);

            tree4Root.build();
            tree4Root.buildNode8All();

            GameObject go = new GameObject("go0");

            go.transform.position = new Vector3(20f, 0, 13f);
            tree4Root.addGameObject(go);
            go = new GameObject("go1");
            go.transform.position = new Vector3(-20f, 0, 13f);
            tree4Root.addGameObject(go);

            tree4Root.log();

            Tree4 t = tree4Root.findTree4Node(go);

            Debug.LogWarning("find = " + t.rect);

            Tree4 Treebyp = tree4Root.findByPot(new Vector3(0f, 5f, 0f));

            Treebyp.log8();
        }
Exemplo n.º 3
0
        public void log8()
        {
            Debug.LogWarning(rect.ToString());

            if (node_0000 != null)
            {
                Debug.LogWarning("\tnode_0000 =>");
                node_0000.log();
            }
            if (node_0130 != null)
            {
                Debug.LogWarning("\tnode_0130 =>");
                node_0130.log();
            }
            if (node_0300 != null)
            {
                Debug.LogWarning("\tnode_0300 =>");
                node_0300.log();
            }
            if (node_0430 != null)
            {
                Debug.LogWarning("\tnode_0430 =>");
                node_0430.log();
            }
            if (node_0600 != null)
            {
                Debug.LogWarning("\tnode_0600 =>");
                node_0600.log();
            }
            if (node_0730 != null)
            {
                Debug.LogWarning("\tnode_0730 =>");
                node_0730.log();
            }
            if (node_0900 != null)
            {
                Debug.LogWarning("\tnode_0900 =>");
                node_0900.log();
            }
            if (node_1030 != null)
            {
                Debug.LogWarning("\tnode_1030 =>");
                node_1030.log();
            }
            //Debug.LogWarning("==================================================>");
        }