コード例 #1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Torch"))
        {
            //  Debug.Log("Can Light");
            if (lM.hasTorch)
            {
                other.transform.Find("Particle System").gameObject.SetActive(true);
                other.transform.GetComponent <BoxCollider>().enabled = false;
                lM.SetTorch();
                if (EventManager.SoundPlayEvent != null)
                {
                    EventManager.SoundPlayEvent(1);
                }
            }
        }

        PickUpBehavior(other);
    }