예제 #1
0
        public bool TryGetFingerCurl(DeviceUse use, out FingerCurl curl)
        {
            SkeletalInput handAnim;

            switch (use)
            {
            case DeviceUse.LeftHand:
                handAnim = _leftHandAnimAction;
                break;

            case DeviceUse.RightHand:
                handAnim = _rightHandAnimAction;
                break;

            default:
                throw new InvalidOperationException($"{nameof(TryGetFingerCurl)} only supports {nameof(DeviceUse.LeftHand)} and {nameof(DeviceUse.RightHand)}");
            }

            if (!handAnim.isActive || handAnim.summaryData == null)
            {
                curl = null;
                return(false);
            }

            curl = new FingerCurl(handAnim.summaryData.thumbCurl, handAnim.summaryData.indexCurl, handAnim.summaryData.middleCurl, handAnim.summaryData.ringCurl, handAnim.summaryData.littleCurl);
            return(true);
        }
예제 #2
0
 public bool TryGetFingerCurl(DeviceUse use, out FingerCurl curl)
 {
     curl = new FingerCurl(0f, 0f, 0f, 0f, 0f);
     return(false);
 }
예제 #3
0
 public bool TryGetFingerCurl(DeviceUse use, out FingerCurl curl)
 {
     return(_internalPlayerInput.TryGetFingerCurl(use, out curl));
 }