Пример #1
0
 public void HandleInput(TouchInputEvent inputEvent)
 {
     if (inputEvent.isPointerDownEvent)
     {
         m_pan.PointerDown(inputEvent);
         m_pinch.PointerDown(inputEvent);
         m_rotate.PointerDown(inputEvent);
         m_touch.PointerDown(inputEvent);
         m_tap.PointerDown(inputEvent);
     }
     else if (inputEvent.isPointerUpEvent)
     {
         m_pan.PointerUp(inputEvent);
         m_pinch.PointerUp(inputEvent);
         m_rotate.PointerUp(inputEvent);
         m_touch.PointerUp(inputEvent);
         m_tap.PointerUp(inputEvent);
     }
     else
     {
         m_pan.PointerMove(inputEvent);
         m_pinch.PointerMove(inputEvent);
         m_rotate.PointerMove(inputEvent);
         m_touch.PointerMove(inputEvent);
         m_tap.PointerMove(inputEvent);
     }
 }
Пример #2
0
 public void HandleInput(TouchInputEvent inputEvent)
 {
     if (inputEvent.isPointerDownEvent && !EventSystem.current.IsPointerOverGameObject())
     {
         m_pan.PointerDown(inputEvent);
         m_pinch.PointerDown(inputEvent);
         m_rotate.PointerDown(inputEvent);
         m_touch.PointerDown(inputEvent);
         m_tap.PointerDown(inputEvent);
     }
     else if (inputEvent.isPointerUpEvent && !EventSystem.current.IsPointerOverGameObject())
     {
         m_pan.PointerUp(inputEvent);
         m_pinch.PointerUp(inputEvent);
         m_rotate.PointerUp(inputEvent);
         m_touch.PointerUp(inputEvent);
         m_tap.PointerUp(inputEvent);
     }
     else
     {
         if (!EventSystem.current.IsPointerOverGameObject())
         {
             m_pan.PointerMove(inputEvent);
             m_pinch.PointerMove(inputEvent);
             m_rotate.PointerMove(inputEvent);
             m_touch.PointerMove(inputEvent);
             m_tap.PointerMove(inputEvent);
         }
     }
 }