Esempio n. 1
0
    private void OnTriggerStay2D(Collider2D collision)
    {
        if (collision.CompareTag("Player") && Input.GetButtonDown("Use"))
        {
            Torch torch = collision.gameObject.GetComponentInChildren <Torch>();

            torch.AddFuel(angleToAdd, intensityToAdd);

            canvas.SetActive(false);
            Destroy(this.gameObject);
        }
    }