Example #1
0
        protected void _LoadGuideNodeConfig(string _strPath)
        {
            dicGuideConfigTable = new Dictionary <EGuideNodeID, SSchemeGuideNodeData>();

            ScpReader reader = new ScpReader(_strPath, true);

            for (int i = 0; i < reader.GetRecordCount(); i++)
            {
                SSchemeGuideNodeData sConfig = new SSchemeGuideNodeData();
                sConfig.nGuideID = reader.GetInt(i, (int)EGuideNodeConfig.GuideID, -1);

                sConfig.GuideStringParams = ScpReader.ToStringList(reader.GetString(i, (int)EGuideNodeConfig.GuideActionStringParams, ""), new char[] { ';' });
                sConfig.GuideIntParams    = ScpReader.ConvertStringToIntArray(reader.GetString(i, (int)EGuideNodeConfig.GuideActionIntParams, ""), new char[] { ';' });
                //sConfig.GuidePreconditionIntParams = ScpReader.ConvertStringToIntArray(reader.GetString(i, (int)EGuideNodeConfig.GuidePreconditionIntParams, ""), new char[] { ';' });

                sConfig.nGuideActionLayerType = reader.GetInt(i, (int)EGuideNodeConfig.GuideActionLayerType, 0);

                dicGuideConfigTable.Add((EGuideNodeID)sConfig.nGuideID, sConfig);
            }
            reader.Dispose();
            reader = null;
        }