Beispiel #1
0
        public static void Parse(string content)
        {
            Clear();
            int headEndIndex = GDSParseUtils.GetCharIndex(content, GDSParseUtils.ObjectSeparator, GDSParseUtils.DataBeginLineIndex);

            if (headEndIndex < 0)
            {
                Logger.LogError("数据文件头缺少结束符'\'n");
                return;
            }
            int curIndex = headEndIndex + 1;

            if (content.Length <= curIndex)
            {
                Logger.LogWarning("数据内容为空,请注意");
                return;
            }
            GDSParseUtils.ParseLine(delegate() {
                Effect data = new Effect();
                data.id     = GDSParseUtils.ParseShort(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.type = GDSParseUtils.ParseShort(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.param1 = GDSParseUtils.ParseShort(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.prefabName = GDSParseUtils.ParseString(content, ref curIndex);
                gdsDic.Add(data.id, data);
            }, content, ref curIndex);
            OutPut();
        }
Beispiel #2
0
        public static void Parse(string content)
        {
            Clear();
            int headEndIndex = GDSParseUtils.GetCharIndex(content, GDSParseUtils.ObjectSeparator, GDSParseUtils.DataBeginLineIndex);

            if (headEndIndex < 0)
            {
                Logger.LogError("数据文件头缺少结束符'\'n");
                return;
            }
            int curIndex = headEndIndex + 1;

            if (content.Length <= curIndex)
            {
                Logger.LogWarning("数据内容为空,请注意");
                return;
            }
            GDSParseUtils.ParseLine(delegate() {
                SkillConfig data = new SkillConfig();
                data.id          = GDSParseUtils.ParseShort(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.prepareTime = GDSParseUtils.ParseShort(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.continousTime = GDSParseUtils.ParseShort(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.cd = GDSParseUtils.ParseShort(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.distance = GDSParseUtils.ParseInt(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.targetInfo = SkillTargetInfo.Parse(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.effectId = GDSParseUtils.ParseShort(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.animName = GDSParseUtils.ParseString(content, ref curIndex);
                gdsDic.Add(data.id, data);
            }, content, ref curIndex);
            OutPut();
        }