示例#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;
 }
示例#2
0
 public bool IsGrabbing(GrabObjController _hand)
 {
     if (_mainHandGrab == _hand || _offHandGrab == _hand || _mainHandClimb == _hand)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
示例#3
0
    public void UngrabMe(GrabObjController _hand, ClimbController _climbController = null)
    {
        if (Climbable)
        {
            _mainHandClimb = null;
            _climbController.DropHand(_hand.gameObject);
            return;
        }

        if (_mainHandGrab == _hand)
        {
            _mainHandGrab = null;
        }
        if (_offHandGrab == _hand)
        {
            _offHandGrab = null;
        }
    }
示例#4
0
 public void GrabMe(GrabObjController _hand, ClimbController _climbController = null)
 {
     if (Climbable)
     {
         _mainHandClimb = _hand;
         _climbController.StartClimbObject(_hand.gameObject);
         return;
     }
     if (!PickupAble)
     {
         return;
     }
     if (!_mainHandGrab)
     {
         _mainHandGrab = _hand;
     }
     else
     {
         _offHandGrab = _hand;
     }
 }