Esempio n. 1
0
 private void DestroyWaterProbe()
 {
     if (waterProbe != null)
     {
         waterProbe.gameObject.Destroy();
         waterProbe = null;
     }
 }
Esempio n. 2
0
 private void CreateWaterProbe()
 {
     if (waterProbe == null)
     {
         waterProbe = WaterVolumeProbe.CreateProbe(rigidBody.transform, localCollider.bounds.extents.magnitude);
         waterProbe.Enter.AddListener(OnWaterEnter);
         waterProbe.Leave.AddListener(OnWaterLeave);
     }
 }