Exemple #1
0
        private List <AbstractGuideCommand> GetCommandArray()
        {
            TDGuideStep data = TDGuideStepTable.GetData(m_GuideStepID);

            if (data == null)
            {
                return(null);
            }

            return(LoadCommands(data.command, data.commonParam));
        }
Exemple #2
0
        private List <IGuideTrigger> GetTriggerArray()
        {
            TDGuideStep data = TDGuideStepTable.GetData(m_GuideStepID);

            if (data == null)
            {
                return(null);
            }

            return(LoadTrigger(data.trigger, data.commonParam));
        }
Exemple #3
0
        private static void OnAddRow(TDGuideStep memberInstance)
        {
            int key = memberInstance.id;

            if (m_DataCache.ContainsKey(key))
            {
                Log.E(string.Format("Invaild,  TDGuideStepTable Id already exists {0}", key));
            }
            else
            {
                m_DataCache.Add(key, memberInstance);
                m_DataList.Add(memberInstance);
            }
        }
Exemple #4
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(TDGuideStep.GetFieldHeadIndex());
#if (UNITY_STANDALONE_WIN) || UNITY_EDITOR || UNITY_STANDALONE_OSX
            dataR.CheckFieldMatch(TDGuideStep.GetFieldHeadIndex(), "GuideStepTable");
#endif
            for (int i = 0; i < rowCount; ++i)
            {
                TDGuideStep memberInstance = new TDGuideStep();
                memberInstance.ReadRow(dataR, fieldIndex);
                OnAddRow(memberInstance);
                memberInstance.Reset();
                CompleteRowAdd(memberInstance);
            }
            Log.I(string.Format("Parse Success TDGuideStep"));
        }
Exemple #5
0
        public void OnStepFinish(GuideStep step, bool forceFinishAllSteps = false)
        {
            if (step.stepID > m_LastFinishStepID)
            {
                m_LastFinishStepID = step.stepID;
                GuideMgr.S.SaveStep(step);
            }

            Log.I("m_LastFinishStepID///////" + m_LastFinishStepID);
            m_GuideStepList[m_CurrentGuideIndex].FinishTrack();
            TDGuideStep lastStep = TDGuideStepTable.GetGuideLastStep(m_GuideID);

            if (lastStep == null || lastStep.id == m_LastFinishStepID || forceFinishAllSteps)
            {
                GuideMgr.S.FinishGuide();
                Log.I("#Guide Finish:" + m_GuideID);
            }
            else
            {
                m_CurrentGuideIndex++;
                m_GuideStepList[m_CurrentGuideIndex].StartTrack();
            }
        }
Exemple #6
0
 static void CompleteRowAdd(TDGuideStep tdData)
 {
 }