Esempio n. 1
0
 // e.g. press
 public TG_TouchGestureEventArgs(TG_ETouchGestureType p_type, Vector2 p_initialPosition, Vector2 p_position, Vector2 p_delta)
 {
     m_type            = p_type;
     m_initialPosition = p_initialPosition;
     m_position        = p_position;
     m_delta           = p_delta;
 }
Esempio n. 2
0
        public void EnableGesture(TG_ETouchGestureType p_type)
        {
            foreach (TG_TouchGestureBase gesture in m_touchGestures)
            {
                if (gesture.Type == p_type)
                {
                    return;
                }
            }
            switch (p_type)
            {
            case TG_ETouchGestureType.TAP:
                m_touchGestures.Add(new TG_TouchGestureTap());
                break;

            case TG_ETouchGestureType.PRESS_1_FINGER:
                m_touchGestures.Add(new TG_TouchGesturePress(TG_ETouchGestureType.PRESS_1_FINGER, 1, 0.1f));
                break;

            case TG_ETouchGestureType.PRESS_2_FINGER:
                m_touchGestures.Add(new TG_TouchGesturePress(TG_ETouchGestureType.PRESS_2_FINGER, 2, 0f));
                break;

            case TG_ETouchGestureType.PRESS_3_FINGER:
                m_touchGestures.Add(new TG_TouchGesturePress(TG_ETouchGestureType.PRESS_3_FINGER, 3, 0f));
                break;

            case TG_ETouchGestureType.PRESS_4_FINGER:
                m_touchGestures.Add(new TG_TouchGesturePress(TG_ETouchGestureType.PRESS_4_FINGER, 4, 0f));
                break;

            case TG_ETouchGestureType.ZOOM:
                m_touchGestures.Add(new TG_TouchGestureZoom());
                break;

            default:
                Debug.LogError("TG_TouchGestures: EnableGesture: unknown gesture type '" + p_type + "'!");
                break;
            }
        }
Esempio n. 3
0
 public TG_TouchGesturePress(TG_ETouchGestureType p_type, int p_fingerCount, float p_minTouchTimeBeforeDetection)
     : base(p_type)
 {
     m_fingerCount = p_fingerCount;
     m_minTouchTimeBeforeDetection = p_minTouchTimeBeforeDetection;
 }
Esempio n. 4
0
 // e.g. zoom
 public TG_TouchGestureEventArgs(TG_ETouchGestureType p_type, Vector2 p_position, Vector2 p_delta)
     : this(p_type, p_position, p_position, p_delta)
 {
 }
Esempio n. 5
0
 public TG_TouchGestureBase(TG_ETouchGestureType p_type)
 {
     m_type = p_type;
 }