Exemple #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();
        }
            public static SkillTargetInfo Parse(string content, ref int curIndex)
            {
                SkillTargetInfo ret = new SkillTargetInfo();

                GDSParseUtils.AssertChar(content, GDSParseUtils.SelfDefineBeginChar, ref curIndex);
                ret.type = GDSParseUtils.ParseShort(content, ref curIndex);
                GDSParseUtils.AssertChar(content, GDSParseUtils.SelfDefineVariableSeparatorChar, ref curIndex);
                ret.param1 = GDSParseUtils.ParseShort(content, ref curIndex);
                GDSParseUtils.AssertChar(content, GDSParseUtils.SelfDefineVariableSeparatorChar, ref curIndex);
                ret.param2 = GDSParseUtils.ParseShort(content, ref curIndex);
                GDSParseUtils.AssertChar(content, GDSParseUtils.SelfDefineVariableSeparatorChar, ref curIndex);
                ret.param3 = GDSParseUtils.ParseShort(content, ref curIndex);
                GDSParseUtils.AssertChar(content, GDSParseUtils.SelfDefineEndChar, ref curIndex);
                return(ret);
            }
        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() {
                SkillEffect data = new SkillEffect();
                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.isAoe = GDSParseUtils.ParseBool(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.areaType = GDSParseUtils.ParseShort(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.continuousTimes = GDSParseUtils.ParseInt(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.intervalTime = GDSParseUtils.ParseInt(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.isEffectSelfCamp = GDSParseUtils.ParseBool(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.param1 = GDSParseUtils.ParseInt(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.param2 = GDSParseUtils.ParseInt(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.gameEffectId = GDSParseUtils.ParseShort(content, ref curIndex);
                gdsDic.Add(data.id, data);
            }, content, ref curIndex);
            OutPut();
        }
        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();
        }