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

            message.touchPosition         = position;
            message.isPointerOverUIObject = IsPointerOverGameObject(fingerId);
        }
Exemplo n.º 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;
        }
Exemplo n.º 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);
            }
        }