Пример #1
0
 private void OnCollisionEnter(Collision collision)
 {
     //プレイヤータグのオブジェクトに触れたら「BatteryCharge」関数を起動
     if (collision.gameObject.CompareTag("Player"))
     {
         battery.BatteryCharge();
     }
 }