示例#1
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);
            }
示例#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();
        }
示例#3
0
 public MonsterBrainDecision(BrainDecisionType decision)
 {
     Decision   = decision;
     TargetInfo = new SkillTargetInfo(SkillTargetType.Self);
 }
 public MonsterBrainDecision(BrainDecisionType decision, CombatSkill skill, SkillTargetInfo targetInfo)
 {
     Decision      = decision;
     SelectedSkill = skill;
     TargetInfo    = targetInfo;
 }