Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; //delete this
        // Put the camera inside the capsule collider
        playerView          = Camera.main.transform;
        playerView.position = new Vector3(
            transform.position.x,
            transform.position.y + playerViewYOffset,
            transform.position.z);

        rb = GetComponent <Rigidbody>();

        xMouseSensitivity = SensWriter.GetSens();
        yMouseSensitivity = SensWriter.GetSens();
    }
Exemplo n.º 2
0
 void Awake()
 {
     DontDestroyOnLoad(transform.gameObject);
     instance = this;
     txt.text = sens.ToString();
 }