示例#1
0
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.S))
        {
            rootNode.PrintTree(rootNode);
        }

        if (Input.GetKeyDown(KeyCode.D))
        {
            Debug.Log("root = " + rootNode.key);
            rootNode.SRD(rootNode);
        }

        if (Input.GetKeyDown(KeyCode.I))
        {
            rootNode = rootNode.Insert(rootNode, valueToInsert, null);
        }
    }