Exemplo n.º 1
0
    void HandleScaled(object sender, System.EventArgs e)
    {
        Debug.Log(" scalled  ");
        SimpleScaleGesture gesture = sender as SimpleScaleGesture;

        Debug.Log(gesture.LocalDeltaScale);
    }
    void HandleScaled(object sender, System.EventArgs e)
    {
        Debug.Log("Scaling");
        SimpleScaleGesture gScale = sender as SimpleScaleGesture;

        ZoomTo(gScale.LocalDeltaScale);
    }
Exemplo n.º 3
0
 void HandleScaled(object sender, System.EventArgs e)
 {
     if (allowZoom)
     {
         Debug.Log("Scalled");
         SimpleScaleGesture gesture = sender as SimpleScaleGesture;
         Debug.Log(gesture.LocalDeltaScale);
         scaleValue  = gesture.LocalDeltaScale;
         targetZoom *= (1 / scaleValue);
     }
 }
Exemplo n.º 4
0
        public override void OnEnter()
        {
            gesture = GestureUtils.GetGesture <SimpleScaleGesture>(Fsm, GameObject, Component, true);
            if (gesture == null)
            {
                LogError("Gesture is missing");
                return;
            }

            gesture.ScaleStarted   += gestureRotateStartedHandler;
            gesture.Scaled         += gestureRotatedHandler;
            gesture.ScaleCompleted += gestureRotateCompletedHandler;
        }
 /// <summary>
 /// Updates this element's scalable property.
 /// </summary>
 private void UpdateScalable()
 {
     if (m_isScalable && (m_simpleScaleGesture == null || !m_simpleScaleGesture.enabled))
     {
         m_simpleScaleGesture         = this.gameObject.AddComponentNoDupe <SimpleScaleGesture>();
         m_simpleScaleGesture.enabled = true;
     }
     else if (!m_isScalable && m_simpleScaleGesture != null)
     {
         Destroy(m_simpleScaleGesture);
         m_simpleScaleGesture = null;
     }
 }
Exemplo n.º 6
0
    void HandleScaled(object sender, System.EventArgs e)
    {
        SimpleScaleGesture gestture = sender as SimpleScaleGesture;

        if (isMovingToNewPosition)
        {
            return;
        }

        distance -= (gestture.LocalDeltaScale - 1) * touchZoomSensitivity;


        QualitySettings.shadowDistance = distance + shadowDistanceBias;

        Debug.Log(QualitySettings.shadowDistance);
    }