Example #1
0
        private void SendTouchBeganMessage(Vector2 position, int fingerId)
        {
            TouchBeganMessage message = m_messageDispatcher.AddMessage <TouchBeganMessage>();

            message.touchPosition         = position;
            message.isPointerOverUIObject = IsPointerOverGameObject(fingerId);
        }
Example #2
0
        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;
        }
Example #3
0
        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);
            }
        }