コード例 #1
0
 public void OnGesture(List <LeanFinger> fingers)
 {
     Debug.Log("Gesture with " + fingers.Count + " finger(s)");
     Debug.Log("    pinch scale: " + LeanGesture.GetPinchScale(fingers));
     Debug.Log("    twist degrees: " + LeanGesture.GetTwistDegrees(fingers));
     Debug.Log("    twist radians: " + LeanGesture.GetTwistRadians(fingers));
     Debug.Log("    screen delta: " + LeanGesture.GetScreenDelta(fingers));
 }
コード例 #2
0
ファイル: LeanMultiTwist.cs プロジェクト: contrejo27/Jose
        protected virtual void Update()
        {
            // Get fingers
            var fingers = LeanSelectable.GetFingers(IgnoreStartedOverGui, IgnoreIsOverGui, RequiredFingerCount, RequiredSelectable);

            if (fingers.Count > 0)
            {
                // Get twist
                var twist = Angle == AngleType.Degrees ? LeanGesture.GetTwistDegrees(fingers) : LeanGesture.GetTwistRadians(fingers);

                // Ignore?
                if (IgnoreIfStatic == true && twist == 0.0f)
                {
                    return;
                }

                // Call events
                if (OnTwist != null)
                {
                    OnTwist.Invoke(twist);
                }
            }
        }