Exemplo n.º 1
0
 private void RaiseEvent(JoyTouchEventName eventName, Vector2 endPosition)
 {
     if (touchHandler != null)
     {
         touchHandler(CreateJoyGesture(eventName, endPosition));
     }
 }
Exemplo n.º 2
0
        // create gesture
        private JoyGesture CreateJoyGesture(JoyTouchEventName eventName, Vector2 endPosition)
        {
            JoyGesture gesture = new JoyGesture();

            gesture.fingerIndex        = m_fingerIndex;
            gesture.eventName          = eventName;
            gesture.virtualRadius      = parame.radius;
            gesture.virtualCenter      = m_virtualCenter;
            gesture.touchStartPosition = m_touchStartPosition;
            gesture.toucheMovePosition = m_touchMovePosition;
            gesture.touchEndPosition   = endPosition;

            gesture.touchMoveing       = m_touchMoveing;
            gesture.touchMoveDirection = m_touchMoveDirection;
            gesture.touchMoveAngle     = m_touchMoveAngle;

            return(gesture);
        }