示例#1
0
    // Update is called once per frame
    void Update()
    {
        CheckZoom();
        CheckPan();

        #region  Perform Shake
        if (Input.GetKeyDown(KeyCode.X))
        {
            mTheCamera.ShakeCamera(new Vector2(3f, 3f));
            GameState.sGameState.IncShakeCount();
        }
        #endregion

        #region SetViewport
        mSmallView.SetViewportMinPos(mVX.value(), mVY.value());
        mSmallView.SetViewprotSize(mVW.value(), mVH.value());
        #endregion

        // Loading new Level
        if (Input.GetKeyDown(KeyCode.L))
        {
            SceneManager.LoadScene("NewLevel");
        }
        GameStateEcho.text = GameState.sGameState.EchoGameState();
    }
示例#2
0
    // Update is called once per frame
    void Update()
    {
        CheckZoom();
        CheckPan();

        // Perform Shake
        if (Input.GetKeyDown(KeyCode.X))
        {
            mTheCamera.SetShakeParameters(mFreg.value(), mDuration.value());
            mTheCamera.ShakeCamera(new Vector2(mDX.value(), mDY.value()));
        }
    }
示例#3
0
    // Update is called once per frame
    void Update()
    {
        CheckZoom();
        CheckPan();

        #region  Perform Shake
        if (Input.GetKeyDown(KeyCode.X))
        {
            mTheCamera.ShakeCamera(new Vector2(3f, 3f));
        }
        #endregion

        #region SetViewport
        mSmallView.SetViewportMinPos(mVX.value(), mVY.value());
        mSmallView.SetViewprotSize(mVW.value(), mVH.value());
        #endregion
    }