// 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; }
public bool IsForceGrabbing(ForceManipulation _hand) { if (_mainForceHand == _hand || _offForceHand == _hand) { return(true); } else { return(false); } }
public void ForceGrabMe(ForceManipulation _hand) { if (!_mainForceHand) { _mainForceHand = _hand; } else { _offForceHand = _hand; } }
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; } }