Example #1
0
 public void AddSkill(SkillVO skill)
 {
     foreach (var skillVo in Defender.skills)
     {
         if (skillVo.cid == skill.cid)
         {
             skillVo.amount += skill.amount;
             return;
         }
     }
     Defender.skills.Add(skill);
 }
Example #2
0
    /// <summary>
    ///   通过id 获取对应的 静态数据
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>

    public void setData(int id)
    {
        IList <SkillVO> list = DataMgr.getInstance().Skills;

        for (int i = 0; i < list.Count; ++i)
        {
            if (list[i].SkillID == id)
            {
                _skill = list[i];
            }
        }
    }
Example #3
0
    protected override void Parse(string data)
    {
        base.Parse(data);

        string[] textColumn = data.Split("\n".ToCharArray());

        obj = new object[textColumn.Length];

        for (int i = 1; i < textColumn.Length; i++)
        {
            string[] textRow = textColumn[i].Split(" ".ToCharArray());

            SkillVO vo = new SkillVO();

            for (int j = 0; j < textRow.Length; j++)
            {
                vo.skill_id = int.Parse(textRow[0]);

                vo.name = textRow[1];

                vo.hero_id = int.Parse(textRow[2]);

                vo.skill_name = textRow[3];

                vo.des = textRow[4];

                vo.skill_icon = textRow[5];

                vo.skill_motion = textRow[6];

                vo.hit = int.Parse(textRow[7]);

                vo.buff = int.Parse(textRow[8]);

                vo.weapon = int.Parse(textRow[9]);

                vo.sound = textRow[10];

                vo.hit_sound = textRow[11];

                vo.types = int.Parse(textRow[12]);

                vo.dist = float.Parse(textRow[13]);

                vo.aoe = int.Parse(textRow[14]);

                vo.aoe_type = int.Parse(textRow[15]);

                vo.aoe_long = float.Parse(textRow[16]);

                vo.aoe_wide = int.Parse(textRow[17]);

                vo.angle = int.Parse(textRow[18]);

                vo.reading = int.Parse(textRow[19]);

                vo.shake = int.Parse(textRow[20]);

                vo.shake_size = textRow[21];

                vo.cass1 = int.Parse(textRow[22]);

                vo.cass1v = textRow[23];

                vo.cass2 = int.Parse(textRow[24]);

                vo.cass2v = textRow[25];

                vo.cass3 = int.Parse(textRow[26]);

                vo.cass3v = textRow[27];

                vo.cass4 = int.Parse(textRow[28]);

                vo.cass4v = int.Parse(textRow[29]);

                vo.cass5 = int.Parse(textRow[30]);

                vo.cass5v = int.Parse(textRow[31]);

                vo.cooling = int.Parse(textRow[32]);

                vo.site = int.Parse(textRow[33]);

                vo.energy = int.Parse(textRow[34]);

                vo.use_type = int.Parse(textRow[35]);

                vo.skill_value = int.Parse(textRow[36]);

                vo.coefficient_add = int.Parse(textRow[37]);

                vo.coefficient_da = float.Parse(textRow[38]);

                vo.amend = int.Parse(textRow[39]);

                vo.or_break = int.Parse(textRow[40]);

                vo.use_limit = int.Parse(textRow[41]);

                vo.nullity_type = int.Parse(textRow[42]);

                vo.hp_limit = int.Parse(textRow[43]);
            }

            obj[i] = vo;


            dic.Add(vo.skill_id, vo);
        }
    }
Example #4
0
    /// <summary>
    ///   通过id 获取对应的 静态数据
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    public void setData(int id)
    {
        IList<SkillVO> list = DataMgr.getInstance().Skills;

        for (int i = 0; i < list.Count; ++i)
        {
            if (list[i].SkillID == id)
            {
                _skill = list[i];
            }
        }
    }