Ejemplo n.º 1
0
        private void LateUpdate()
        {
            float xAxis = inputProvider.GetAxisValue(0);
            float zAxis = inputProvider.GetAxisValue(1);
            float yAxis = inputProvider.GetAxisValue(2);

            if (GameManager.instance.IsMouseOverGameWindow)
            {
                if (xAxis != 0 || zAxis != 0)
                {
                    PanScreen(xAxis, zAxis);
                }

                if (yAxis != 0)
                {
                    ZoomScreen(yAxis);
                }
                HandleCameraMovement();
                HandleCameraRotation();
                HandleMouseDrag();
            }

            transform.position = Vector3.Lerp(transform.position, newPosition, time * Time.deltaTime);
            transform.rotation = Quaternion.Lerp(transform.rotation, newRotation, time * Time.deltaTime);
        }
Ejemplo n.º 2
0
    void Update()
    {
        if (boardCanvas.activeInHierarchy == true)
        {
            float x = inputProvider.GetAxisValue(0);
            float y = inputProvider.GetAxisValue(1);
            float z = inputProvider.GetAxisValue(2);
            //Debug.Log("x: "+x+" y: "+y+" z: "+z);

            if (x != 0 || y != 0)
            {
                PanScreen(x, y);
            }

            if (z != 0)
            {
                ZoonScreen(z);
            }
        }
    }