コード例 #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.name == "Player")
     {
         flashLight.RestoreLightAngle(75f);
         flashLight.RestoreLightIntensity(4f);
     }
 }
コード例 #2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == "Player")
     {
         myLightSystem = FindObjectOfType <FlashLightSystem>();
         //myLightSystem = other.GetComponent<FlashLightSystem>();
         myLightSystem.RestoreLightAngle();
         myLightSystem.RestoreLightIntensity(intensityRestore);
         Destroy(gameObject);
     }
 }