Ejemplo 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;
 }
Ejemplo n.º 2
0
 public bool IsGrabbing(GrabObjController _hand)
 {
     if (_mainHandGrab == _hand || _offHandGrab == _hand || _mainHandClimb == _hand)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 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;
        }
    }
Ejemplo n.º 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;
     }
 }