Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.A))
        {
            mPlayer.MoveLeft();
        }
        if (Input.GetKeyDown(KeyCode.S))
        {
            mPlayer.MoveBottom();
        }
        if (Input.GetKeyDown(KeyCode.D))
        {
            mPlayer.MoveRight();
        }
        if (Input.GetKeyDown(KeyCode.W))
        {
            mPlayer.MoveTop();
        }
        if (!mIsZoomBlocked)
        {
            if (Input.GetAxis("Mouse ScrollWheel") > 0f)
            {
                mCamera.IncreaseZoom();
            }

            if (Input.GetAxis("Mouse ScrollWheel") < 0f)
            {
                mCamera.DecreaseZoom();
            }
        }
    }
Exemplo n.º 2
0
 private void DecreaseZoom()
 {
     mCamera.DecreaseZoom();
 }