private void SendTouchMovedMessage(Vector2 position, Vector2 deltaPosition, float deltaTime) { TouchMovedMessage message = m_messageDispatcher.AddMessage <TouchMovedMessage>(); message.touchPosition = position; message.deltaPosition = deltaPosition; message.deltaTime = deltaTime; }
private void HandleTouchMovedMessage(IMessageProvider provider) { if (m_isSwiping) { TouchMovedMessage message = provider.GetMessage <TouchMovedMessage>(); if (DetectSwipe(message.touchPosition, message.deltaPosition)) { m_isSwiping = false; } } }