Ejemplo n.º 1
0
        public static void parsing(string iostring)
        {
            List <STFish>            list = getList();
            Dictionary <int, STFish> map  = getMap();

            list.Clear();
            map.Clear();
            ConvertModel buf = ConvertModel.getInstance();

            buf.setting(iostring);
            STFish sTFish;

            while (!buf.limit())
            {
                sTFish         = new STFish();
                sTFish.id      = buf.readInt();
                sTFish.life    = buf.readInt();
                sTFish.name    = buf.readString();
                sTFish.speed   = buf.readFloat();
                sTFish.diamond = buf.readInt();
                sTFish.coin    = buf.readInt();
                sTFish.prop    = buf.readInt();
                list.Add(sTFish);
                map.Add(sTFish.Id, sTFish);
            }
        }
Ejemplo n.º 2
0
        public static void setIOString(string type, string iostring)
        {
            switch (type)
            {
            case STFishType: {
                STFish.parsing(iostring);
                break;
            }

            case STChapterType: {
                STChapter.parsing(iostring);
                break;
            }
            }
        }