Пример #1
0
 /// <summary>
 /// Sets the gravity of a game object and attach to it.
 /// </summary>
 /// <param name="_IO">The io where the changed where be performed</param>
 /// <param name="_hasGravity">True = Gravity and not kinematic, False = No Gravity and kinematic</param>
 private static void SetGravityAndAttachIO(Gaze_InteractiveObject _IO, bool _hasGravity)
 {
     if (_IO)
     {
         if (_IO.IsGravityLocked())
         {
             if (SHOW_GRAVITY_WARNINGS)
             {
                 Debug.LogWarning(string.Format("GravityManager -> Interactive object: {0} has ben requested to change its gravity but the object is LOCKED", _IO.name));
             }
             return;
         }
         _IO.SetGravityAndAttach(_hasGravity);
     }
 }
Пример #2
0
 private static void ReturnToDefaultState(Gaze_InteractiveObject _IO)
 {
     if (_IO.IsGravityLocked())
     {
         if (SHOW_GRAVITY_WARNINGS)
         {
             Debug.LogWarning(string.Format("GravityManager -> Interactive object: {0} has ben requested to change its gravity but the object is LOCKED", _IO.name));
         }
         return;
     }
     else
     {
         _IO.ReturnToInitialGravityState();
     }
 }