Example #1
0
    private void UpdatePositions()
    {
        m_touchPos = Input.mousePosition;

        m_touchPos.x = ((m_touchPos.x - m_gameManager.GetScreenWidth()) / m_gameManager.GetScreenWidth()
                        * HORIZONTAL_SPEED);
        m_touchPos.y = ((m_touchPos.y - m_gameManager.GetScreenHeight()) / m_gameManager.GetScreenHeight()
                        * VERTICAL_SPEED);

        m_swipeManager.UpdateSwipeIndicator();
        m_backgroundManager.SetBackgroundPosition(m_swipeManager.GetCurrentSwipePosition());

        if (m_inputManager.IsFirstTouch())
        {
            m_startTouchPosition = m_touchPos;
        }
    }