Пример #1
0
    public IEnumerator Attack(SkillConfig config, Vector3Int clickedPos, Unit clickedUnit)
    {
        SerializableDictionary <Vector3Int, AttackPatternField> fields = skillHandler.AttackArea(config);

        bool isAttackClicked = fields.ContainsKey(clickedPos) && fields[clickedPos] == AttackPatternField.On;

        if (isAttackClicked)
        {
            yield return(StartCoroutine(skillHandler.ExecuteAttack(config, clickedPos, clickedUnit)));
        }
    }