Ejemplo n.º 1
0
        protected void _start(OnVoid cb)
        {
            Csv.instance.parse1(
                PathInfo.STREAM_URL + "Configs/Csv/" + fileName,
                key1,
                (Dictionary <int, CsvValue> dt) =>
            {
                data = new Dictionary <int, V>();
                foreach (var pair in dt)
                {
                    data[pair.Key] = new V().tryParse(pair.Value);
                }

                if (cb != null)
                {
                    cb();
                }
            });
        }
Ejemplo n.º 2
0
 public void _start(OnVoid cb)
 {
     Csv.instance.parse2(
         PathInfo.STREAM_URL + "Configs/Csv/" + fileName,
         key1, key2,
         (Dictionary <int, Dictionary <int, CsvValue> > dt) =>
     {
         _data = new Dictionary <int, Dictionary <int, V> >();
         foreach (var p in dt)
         {
             _data[p.Key] = new Dictionary <int, V>();
             foreach (var pair in p.Value)
             {
                 _data[p.Key][pair.Key] = new V().tryParse(pair.Value);
             }
         }
         if (cb != null)
         {
             cb();
         }
     });
 }
Ejemplo n.º 3
0
        private IEnumerator _load(OnVoid cb)
        {
            var url = PathInfo.STREAM_URL + "Configs/Xml/" + fileName;
            WWW www = new WWW(url);

            yield return(www);

            if (string.IsNullOrEmpty(www.error))
            {
                var xml = new XmlDocument();
                var set = new XmlReaderSettings();
                set.IgnoreComments = true;
                xml.LoadXml(www.text);
                onParse(xml);
                if (cb != null)
                {
                    cb();
                }
            }
            else
            {
                Collector.Error.add(this, url + " : " + www.error);
            }
        }
Ejemplo n.º 4
0
 public static void start(OnVoid cb)
 {
     instance._start(cb);
 }
Ejemplo n.º 5
0
 protected void load(OnVoid cb)
 {
     StartCoroutine(_load(cb));
 }
Ejemplo n.º 6
0
 public static void start(OnVoid cb)
 {
     instance.load(cb);
 }