예제 #1
0
    private void OnTriggerEnter2D(Collider2D other)
    {
        LinkController controller = other.GetComponent <LinkController>();

        if (controller != null && collectible)
        {
            controller.ChangeTriforceCount(1);

            winScreen.GetComponent <WinScreenTextController>().go = true;
            Destroy(rest);
            Destroy(gameObject);

            controller.PlaySound(collected);
        }
    }