private void SendTouchBeganMessage(Vector2 position, int fingerId) { TouchBeganMessage message = m_messageDispatcher.AddMessage <TouchBeganMessage>(); message.touchPosition = position; message.isPointerOverUIObject = IsPointerOverGameObject(fingerId); }
private void HandleTouchBeganMessage(IMessageProvider provider) { TouchBeganMessage message = provider.GetMessage <TouchBeganMessage>(); m_origin = message.touchPosition; m_time = Time.time; m_state = SwipeDirection.None; m_isSwiping = true; }
private void HandleTouchBeganMessage(IMessageProvider provider) { TouchBeganMessage message = provider.GetMessage <TouchBeganMessage>(); if (!message.isPointerOverUIObject) { Vector3 position = UnityHelper.ConvertScreenToWorldPoint(message.touchPosition, Camera.main); GameContext.ballFactory.CreateBall(position); GameHelper.PlaySound(SfxId.Touch); } }