예제 #1
0
    public void InitXMLRoot()
    {
        curNodeIndx = 0;
        curTextIndx = 0;

        System.Text.StringBuilder pathString = new System.Text.StringBuilder();
        pathString.Append(XML_NAME);
        pathString.Append(XML_EXT);

        TextAsset xml = (TextAsset)Resources.Load(XML_NAME);
        xmlRoot = AdvRoot.ParseXML(xml.text);
        curNode = xmlRoot.nodes[curNodeIndx];
        curNode.nodes.AddRange(xmlRoot.nodes);

        // Locally load xml file
        //xmlRoot = AdvRoot.Load(System.IO.Path.Combine(Application.streamingAssetsPath, pathString.ToString()));
    }
예제 #2
0
    public void InitXMLRoot()
    {
        curNodeIndx = 0;
        curTextIndx = 0;

        System.Text.StringBuilder pathString = new System.Text.StringBuilder();
        pathString.Append(XML_NAME);
        pathString.Append(XML_EXT);

        TextAsset xml = (TextAsset)Resources.Load(XML_NAME);

        xmlRoot = AdvRoot.ParseXML(xml.text);
        curNode = xmlRoot.nodes[curNodeIndx];
        curNode.nodes.AddRange(xmlRoot.nodes);

        // Locally load xml file
        //xmlRoot = AdvRoot.Load(System.IO.Path.Combine(Application.streamingAssetsPath, pathString.ToString()));
    }
예제 #3
0
    private void Start()
    {
        root       = new AdvRoot();
        root.nodes = new AdvNode[5];

        StartNode();
        Node1();
        Node2();
        Node3();
        EndNode();

        if (saveInResources)
        {
            root.Save(Path.Combine(Application.dataPath + "/Resources/", "astarisAdventure.xml"));
        }

        if (saveLocal)
        {
            root.Save(Path.Combine(Application.dataPath + "/AstarisAdventure/StreamingASsets/", "astarisAdventure.xml"));
        }
    }
예제 #4
0
    private void Start()
    {
        root = new AdvRoot();
        root.nodes = new AdvNode[5];

        StartNode();
        Node1();
        Node2();
        Node3();
        EndNode();

        if (saveInResources) {
            root.Save(Path.Combine(Application.dataPath + "/Resources/", "astarisAdventure.xml"));
        }

        if (saveLocal) {
            root.Save(Path.Combine(Application.dataPath + "/AstarisAdventure/StreamingASsets/", "astarisAdventure.xml"));
        }
    }