Example #1
0
    private void CheckMouseInput()
    {
        //Check if the mouse has been moved horizontally
        float rotationChange = Input.GetAxisRaw("Mouse X");

        if (rotationChange == 0)
        {
            return;
        }

        //If the wheel is moved move the target
        float degress = rotationChange * rotationSpeed;

        foreach (List <GameObject> row in displayObjects.displays)
        {
            foreach (GameObject display in row)
            {
                DisplayData data = display.GetComponentInChildren <DisplayData>();
                data.ChangeRotation(degress);
            }
        }
    }