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 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() { 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(); }
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(); }