Ejemplo n.º 1
0
    public void HandleScrollWheel(object sender, ScrollWheelEventArgs args)
    {
        if (_currentState != CameraState.IDLE)
        {
            return;
        }

        _scrollZoomControl.ScrollDelta = args.scrollDelta;
        _scrollZoomControl.Update();
    }
Ejemplo n.º 2
0
    public void Zoom(object sender, ScrollWheelEventArgs e)
    {
        GetComponent <Camera>().fieldOfView -= e.ScrollValue * ZoomRate * Time.deltaTime;

        if (GetComponent <Camera>().fieldOfView < m_MinFieldOfView)
        {
            GetComponent <Camera>().fieldOfView = m_MinFieldOfView;
        }
        else if (GetComponent <Camera>().fieldOfView > m_MaxFieldOfView)
        {
            GetComponent <Camera>().fieldOfView = m_MaxFieldOfView;
        }

        CheckEdgeMovement();
    }
    public void Zoom(object sender, ScrollWheelEventArgs e)
    {
        GetComponent<Camera>().fieldOfView -= e.ScrollValue*ZoomRate*Time.deltaTime;

        if (GetComponent<Camera>().fieldOfView < m_MinFieldOfView)
        {
            GetComponent<Camera>().fieldOfView = m_MinFieldOfView;
        }
        else if (GetComponent<Camera>().fieldOfView > m_MaxFieldOfView)
        {
            GetComponent<Camera>().fieldOfView = m_MaxFieldOfView;
        }

        CheckEdgeMovement();
    }
 //------------------------------------------------------------------------------------------
 private void ScrollWheelHandler(object sender, ScrollWheelEventArgs e)
 {
     //Zoom In/Out
     m_Camera.Zoom (sender, e);
     m_MiniMapController.ReCalculateViewRect ();
 }
Ejemplo n.º 5
0
 private void ScrollWheelChanged(ScrollWheelEventArgs args)
 {
     SelectWeapon(args.Id);
 }
Ejemplo n.º 6
0
    //------------------------------------------------------------------------------------------

    private void ScrollWheelHandler(object sender, ScrollWheelEventArgs e)
    {
        //Zoom In/Out
        m_Camera.Zoom(sender, e);
        m_MiniMapController.ReCalculateViewRect();
    }