Esempio 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);
            }
        }
Esempio n. 2
0
 public static ConvertModel getInstance()
 {
     if (null == instance)
     {
         instance = new ConvertModel();
     }
     return(instance);
 }
Esempio n. 3
0
        public static void parsing(string iostring)
        {
            List <STChapter>            list = getList();
            Dictionary <int, STChapter> map  = getMap();

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

            buf.setting(iostring);
            STChapter sTChapter;

            while (!buf.limit())
            {
                sTChapter     = new STChapter();
                sTChapter.id  = buf.readInt();
                sTChapter.sOF = buf.readArray();
                list.Add(sTChapter);
                map.Add(sTChapter.Id, sTChapter);
            }
        }