Beispiel #1
0
        private static void OnAddRow(TDGuide memberInstance)
        {
            int key = memberInstance.id;

            if (m_DataCache.ContainsKey(key))
            {
                Log.E(string.Format("Invaild,  TDGuideTable Id already exists {0}", key));
            }
            else
            {
                m_DataCache.Add(key, memberInstance);
                m_DataList.Add(memberInstance);
            }
        }
Beispiel #2
0
 private void RegisterGuide()
 {
     for (int i = 0; i < TDGuideTable.dataList.Count; ++i)
     {
         TDGuide data = TDGuideTable.dataList[i];
         if (IsGuideFinish(data.id))
         {
             continue;
         }
         Guide guide = new Guide(data.id);
         guide.RegisterTrack();
         m_TrackingGuideList.AddLast(guide);
     }
 }
Beispiel #3
0
        public static void Parse(byte[] fileData)
        {
            m_DataCache.Clear();
            m_DataList.Clear();
            DataStreamReader dataR = new DataStreamReader(fileData);
            int rowCount           = dataR.GetRowCount();

            int[] fieldIndex = dataR.GetFieldIndex(TDGuide.GetFieldHeadIndex());
#if (UNITY_STANDALONE_WIN) || UNITY_EDITOR || UNITY_STANDALONE_OSX
            dataR.CheckFieldMatch(TDGuide.GetFieldHeadIndex(), "GuideTable");
#endif
            for (int i = 0; i < rowCount; ++i)
            {
                TDGuide memberInstance = new TDGuide();
                memberInstance.ReadRow(dataR, fieldIndex);
                OnAddRow(memberInstance);
                memberInstance.Reset();
                CompleteRowAdd(memberInstance);
            }
            Log.I(string.Format("Parse Success TDGuide"));
        }