Beispiel #1
0
 protected virtual void OnDisable()
 {
     BuoyancyManager.Unsubscribe(this);
     _rigidbody.drag        = originalDrag;
     _rigidbody.angularDrag = originalAngleDrag;
     isBackups = false;
 }
Beispiel #2
0
 protected virtual void OnEnable()
 {
     BuoyancyManager.Subscribe(this);
     if (!isBackups)
     {
         originalDrag      = _rigidbody.drag;
         originalAngleDrag = _rigidbody.angularDrag;
         isBackups         = true;
     }
 }