コード例 #1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == "Player")
     {
         //PlayerHealth = other.gameObject.GetComponentsInChildren<playerHealth> ();
         //	other.GetComponentInChildren<playerHealth>().AddHealth(10);
         playerHealth.AddHealth(10);
         Destroy(gameObject);
     }
 }