Beispiel #1
0
    private void ShowAbilityArea <T>(ActiveAbility <T> ability, UnityAction <T> onComplete) where T : Entity
    {
        var selector = new TileTargetSelector <T>(
            _caster,
            ability.GetTilesArea(_caster),
            ability.GetTargetFromSelectedTile,
            (t) =>
        {
            CheckCardCost(() =>
            {
                onComplete(t);
                _callerGroup.CloseAction();
            });
        }
            );

        CancelAction = selector.ClearSelection;
    }