Beispiel #1
0
        private void SendTouchMovedMessage(Vector2 position, Vector2 deltaPosition, float deltaTime)
        {
            TouchMovedMessage message = m_messageDispatcher.AddMessage <TouchMovedMessage>();

            message.touchPosition = position;
            message.deltaPosition = deltaPosition;
            message.deltaTime     = deltaTime;
        }
Beispiel #2
0
 private void HandleTouchMovedMessage(IMessageProvider provider)
 {
     if (m_isSwiping)
     {
         TouchMovedMessage message = provider.GetMessage <TouchMovedMessage>();
         if (DetectSwipe(message.touchPosition, message.deltaPosition))
         {
             m_isSwiping = false;
         }
     }
 }