Ejemplo n.º 1
0
    private void OnTriggerEnter(Collider other)
    {
        switch (other.gameObject.tag)
        {
        case "Collectable":
            Collectable?.Invoke(other);
            break;

        case "Lives":
            Lives?.Invoke(other);
            break;

        case "Checkpoint":
            Checkpoint?.Invoke(other);
            break;
        }
    }