Пример #1
0
        protected virtual void CheckArrowRelease()
        {
            var shootArrow = false;

            if (StringLimitStyle == HVRBowLimitStyle.ShootArrow && _nockDistance > StringLimit)
            {
                NockGrabbable.ForceRelease();
                shootArrow = Arrow;
            }

            if (!Arrow)
            {
                return;
            }

            if (!shootArrow && _previousHeld && !NockGrabbable.IsBeingHeld && _nockDistance > ShootThreshold)
            {
                shootArrow = true;
            }

            if (shootArrow)
            {
                OnArrowShot();
            }
        }
Пример #2
0
        private IEnumerator DropAndDestroy(HVRGrabbable grabbable)
        {
            yield return(null);

            grabbable.ForceRelease();
            Destroy(grabbable.gameObject);
        }
Пример #3
0
        private IEnumerator Drop(HVRGrabbable grabbable)
        {
            yield return(null);

            grabbable.ForceRelease();
        }