Exemplo n.º 1
0
Arquivo: u3d.cs Projeto: Klanly/ncnn
        public void LoadnonYAML(string metapath, yElement metain, string Dummy)
        {
            yType = yObjType.File;
            int len = UnityYAMLAsset.GameBase.Length + 1;

            Path = metapath.Substring(len, metapath.Length - len - 5);
            meta = metain;
            Blocks[0xFFFFFFFFFFFFFFFF] = new yBlock(Dummy);
        }
Exemplo n.º 2
0
Arquivo: u3d.cs Projeto: Klanly/ncnn
        public static yBlock LookUpBlock(string fidstr, Dictionary <ulong, yBlock> LookUp, yObject sender)
        {
            yBlock yy;
            ulong  fid = ulong.Parse(fidstr.Trim());

            if (fid == 0)
            {
                return(yBlock.fZero);
            }

            if (!LookUp.TryGetValue(fid, out yy))
            {
                yy          = new yBlock(string.Empty);
                LookUp[fid] = yy;
            }

            yy.refs.Add(sender);
            return(yy);
        }
Exemplo n.º 3
0
Arquivo: u3d.cs Projeto: Klanly/ncnn
        public void Load(string metapath, yElement metain, string[] txt)
        {
            int len = UnityYAMLAsset.GameBase.Length + 1;

            Path = metapath.Substring(len, metapath.Length - len - 5);
            meta = metain;



            List <int>   addrlist = new List <int>();
            List <ulong> idlist   = new List <ulong>();

            len = txt.Length;
            for (int i = 2; i < len; i++)
            {
                if (txt[i].StartsWith("--- !u!"))
                {
                    addrlist.Add(i);
                    string[] paar = txt[i].Substring(7).Split(kongge, StringSplitOptions.RemoveEmptyEntries);
                    ulong    idd  = ulong.Parse(paar[1]);
                    idlist.Add(idd);
                    Blocks[idd] = new yBlock(this, int.Parse(paar[0]), idd);
                }
            }

            addrlist.Add(len);
            len = addrlist.Count - 1;



            for (int i = 0; i < len; i++)
            {
                int start = addrlist[i];
                int end   = addrlist[i + 1];



                Blocks[idlist[i]].Load(StringGroup.Parse(txt, start + 1, end), Blocks);
            }
            isDummy = false;
        }