예제 #1
0
        private void Reprocess()
        {
            foreach (var obj in m_Spawned)
            {
                Destroy(obj);
            }

            m_Spawned.Clear();

            m_Package = new TextPackage("AllPackages");
            foreach (var asset in toParse)
            {
                TextPackage.Merge(asset, m_Package);
            }

            foreach (var node in m_Package)
            {
                GameObject nodeObj = new GameObject(node.Id());
                nodeObj.transform.position = node.Position();
                TextMesh nodeText = nodeObj.AddComponent <TextMesh>();
                nodeText.anchor = TextAnchor.MiddleCenter;
                nodeText.color  = node.Color();
                nodeText.text   = node.Text();
                m_Spawned.Add(nodeObj);
            }
        }
예제 #2
0
 static public void Merge(TextAsset inTextAsset, TextPackage ioTarget)
 {
     BlockParser.Parse(ref ioTarget, inTextAsset.name, inTextAsset.text, BlockParsingRules.Default, new Generator());
 }