Exemplo n.º 1
0
    public void Cast()
    {
        var spell = _registry
                    .WithinRadius(1f, transform.position)
                    .Where(other => other.Key != _registryId)
                    .Select(other => other.Value.Fuse(_spell))
                    .FirstOrDefault(other => other != null) ?? _spell;

        Debug.Log(spell.effect());
        CleanUp();
    }