Exemplo n.º 1
0
    private void OnTriggerEnter2D(Collider2D other)
    {
        LinkController controller = other.GetComponent <LinkController>();

        if (controller != null && collectible)
        {
            triforceIcon.SetActive(true);
            linkIcon.SetActive(true);

            controller.CollectCompass();

            Destroy(gameObject);

            controller.PlaySound(collected);
        }
    }