Exemplo n.º 1
0
 // Start is called before the first frame update
 void Awake()
 {
     _grabObjController = gameObject.GetComponent <GrabObjController>();
     _forceManipulation = gameObject.GetComponent <ForceManipulation>();
     _forceGesture      = gameObject.GetComponent <ForceGestureHand>();
     _climbHand         = gameObject.GetComponent <ClimbHand>();
     HandSource         = _grabObjController.HandSource;
 }
Exemplo n.º 2
0
 public bool IsForceGrabbing(ForceManipulation _hand)
 {
     if (_mainForceHand == _hand || _offForceHand == _hand)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 3
0
 public void ForceGrabMe(ForceManipulation _hand)
 {
     if (!_mainForceHand)
     {
         _mainForceHand = _hand;
     }
     else
     {
         _offForceHand = _hand;
     }
 }
Exemplo n.º 4
0
 public void ForceUngrabMe(ForceManipulation _hand, bool UnGrabAll = false)
 {
     print("help");
     if (UnGrabAll == true)
     {
         _mainForceHand = null;
         _offForceHand  = null;
     }
     if (_mainForceHand == _hand)
     {
         _mainForceHand = null;
     }
     if (_offForceHand == _hand)
     {
         _offForceHand = null;
     }
     if (!_mainForceHand && _offForceHand)
     {
         _mainForceHand = _offForceHand;
         _offForceHand  = null;
     }
 }