Example #1
0
    void OnTouchStart(TouchInformation _pTouchInfo)
    {
        if (mCurrentPinch != null)
        {
            mCurrentPinch.mTouchTwo      = _pTouchInfo;
            mCurrentPinch.mStartDistance = mCurrentPinch.GetCurrentDistance();
            mPinchGestures.Add(mCurrentPinch);

            try
            {
                if (OnPinchStart != null)
                {
                    OnPinchStart(mCurrentPinch);
                }
            } catch (Exception e)
            {
                Debug.LogException(e);
            }

            mCurrentPinch = null;
        }
        else
        {
            mCurrentPinch           = new PinchGestureEvent();
            mCurrentPinch.mTouchOne = _pTouchInfo;
        }
    }