Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        if (!pv.isMine || ps.playerStateNum == Constants.DEAD || om.InventoryOn)
        {
            return;
        }
        else
        {
            rotationX += Input.GetAxis("Mouse Y") * sensitivity * Time.deltaTime;
            rotationX %= 360;
            rotationX  = Mathf.Clamp(rotationX, -30.0f, 80.0f);
            transform.Rotate(Vector3.left * Time.deltaTime * Constants.defaultSensitivity * Input.GetAxis("Mouse Y"));

            cm.AnimFloat("RotationX", rotationX);
            //Debug.Log("rotationX : " + rotationX);
        }
    }