public override void StartGameflow() { rewind.ToggleScene(); if (rewindVideo) { rewindVideo.ToggleScene(); } director.stopped += OnPlayableDirectorEnded; }
private void Update() { //Mouvement float _xMov = Input.GetAxis("Horizontal"); float _zMov = Input.GetAxis("Vertical"); //animator.Play("Walk"); Vector3 _moveHorizontal = transform.right * _xMov; Vector3 _moveVectical = transform.forward * _zMov; Vector3 _velocity = (_moveHorizontal + _moveVectical).normalized * speed; motor.Move(_velocity); // Rotate float _yRot = Input.GetAxis("Mouse X"); Vector3 _rotation = new Vector3(0, _yRot, 0) * lookSensitivityX; motor.Rotate(_rotation); float _xRot = Input.GetAxis("Mouse Y"); Vector3 _camerarotation = new Vector3(_xRot, 0, 0) * lookSensitivityY; motor.RotateCamera(_camerarotation); /* if (Input.GetKeyDown(KeyCode.A)) * { * * } * else if (Input.GetKeyUp(KeyCode.A)) * { * * }*/ if (Input.GetKeyDown(KeyCode.LeftShift)) { rewind.ReverseScene(); rewindVideo.ReverseScene(); } else if (Input.GetKeyUp(KeyCode.LeftShift)) { rewind.ResumeScene(); rewindVideo.ResumeScene(); } if (Input.GetKeyDown(KeyCode.Space) && rewind != null) { Debug.Log("toggle scene"); rewind.ToggleScene(); rewindVideo.ToggleScene(); } }