Пример #1
0
 private void TryToThrow(bool isRightHanded) {
   if (HoldingObject) {
     // Prevent opposite handed motions from throwing
     if (isRightHanded == _usingRightHand) {
       InHand.Throw(ThrowOrigin, isRightHanded);
       InHand = null;
       OnThrown.Invoke();
     }
   }
 }
Пример #2
0
 private void TryToCatch(Throwable t) {
   if (HoldingObject) {
     t.CompleteThrow();
   } else {
     Pickup(t);
     OnCatch.Invoke();
   }
 }
Пример #3
0
 private void Pickup(Throwable t) {
   if (t == null) {
     return;
   }
   InHand = t;
   InHand.PickUp(_usingRightHand);
   GameObject obj = InHand.gameObject;
   obj.transform.localRotation = Quaternion.identity;
   obj.transform.SetParent(Hand.transform, false);
   OrientHeldObject();
   OnObjectSpawned.Invoke();
 }