Exemple #1
0
    public SkillCommand(Role role, int skillId, Vector2 pt, Role target = null) : base(role)
    {
        _target = target;
        _skill  = SkillFactory.Create(skillId, role, pt, _target);

        _canRelease = false;
    }
Exemple #2
0
 public List <ISkill> CreateSkills()
 {
     return(SkillTypes
            .GroupBy(x => x)
            .Select(x => SkillFactory.Create(x.Key, x.Count()))
            .ToList());
 }
Exemple #3
0
    private void AttackMonster(Role target)
    {
        _attackingMonster = target;
        Skill skill = SkillFactory.Create(_autoSkillId, _hero, Vector2.zero, target);

        skill.Release();
        _releasedTimeCount = 3;
    }
Exemple #4
0
    private Skill SelectSkill(Role target)
    {
        int skillId = _skillSelector.SelectSkill(target);

        if (skillId != -1)
        {
            return(SkillFactory.Create(skillId, _monster, Vector2.zero, target));
        }
        return(null);
    }
Exemple #5
0
 /// <summary>
 /// A helper method used to populate the SkillsContainer with default skills having 0 ranks in them.
 /// </summary>
 public static void PopulateContainer()
 {
     foreach (ClassSkills skill in Enum.GetValues(typeof(ClassSkills)))
     {
         if (SkillFactory.Create(skill) != null)
         {
             SkillsContainer.Add(SkillFactory.Create(skill));
         }
     }
 }
Exemple #6
0
        private void Init()
        {
            _map.Clear();
            TextAsset textAsset = Resources.Load <TextAsset>("Config/Skill/02");
            ResMd     resMd     = new ResMd();

            resMd.ParseText(textAsset.text);
            List <EdNode> nodes  = resMd._root_node.GetNodes("Sequence");
            int           length = nodes.Count;

            for (int i = 0; i < length; i++)
            {
                SequenceLine line = SkillFactory.Create(nodes[i]);
                if (line == null)
                {
                    continue;
                }
                _map.Add(line.Id, line);
            }
        }