Пример #1
0
 public static void ParseLine(System.Action hdlParse, string content, ref int curIndex)
 {
     do
     {
         hdlParse.Invoke();
     } while(GDSParseUtils.IsCurCharEquals(GDSParseUtils.ObjectSeparator, content, ref curIndex) && curIndex < content.Length);
 }
Пример #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() {
                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();
        }
Пример #3
0
            public static BorthPos Parse(string content, ref int curIndex)
            {
                BorthPos ret = new BorthPos();

                GDSParseUtils.AssertChar(content, GDSParseUtils.SelfDefineBeginChar, ref curIndex);
                ret.x = GDSParseUtils.ParseInt(content, ref curIndex);
                GDSParseUtils.AssertChar(content, GDSParseUtils.SelfDefineVariableSeparatorChar, ref curIndex);
                ret.y = GDSParseUtils.ParseInt(content, ref curIndex);
                GDSParseUtils.AssertChar(content, GDSParseUtils.SelfDefineEndChar, ref curIndex);
                return(ret);
            }
Пример #4
0
            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);
            }
Пример #5
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() {
                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();
        }
Пример #6
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() {
                BattleTest data = new BattleTest();
                data.id         = GDSParseUtils.ParseInt(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.camp = GDSParseUtils.ParseInt(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.life = GDSParseUtils.ParseInt(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.speed = GDSParseUtils.ParseInt(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.attack = GDSParseUtils.ParseInt(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.attackRange = GDSParseUtils.ParseInt(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                data.borthPos = BorthPos.Parse(content, ref curIndex);
                GDSParseUtils.MoveNextVariable(content, ref curIndex);
                GDSParseUtils.ParseArray(delegate() {
                    data.skillList.Add(GDSParseUtils.ParseInt(content, ref curIndex));
                }, content, ref curIndex);
                gdsDic.Add(data.id, data);
            }, content, ref curIndex);
            OutPut();
        }
Пример #7
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();
        }