/// <summary> /// Update is called once per frame /// </summary> protected override void Update() { if (Global.IsGamePaused) { return; } if (_PitchTimeTW.IsEnabledAndOver) { Pitch = _PrePitch; _PitchTimeTW.End(); } _PitchSmoothing.Update(PitchSmoothing); base.Update(); }
private void Update() { // 改投影矩阵 persp.Update(); var camera = GetComponent <Camera>(); var mat = ProjectionMatrix.Get(persp.current, camera.pixelRect, dist.current); camera.projectionMatrix = mat; // 改旋转角 rotation.Update(); // 改位置 center.Update(); dist.Update(); transform.position = center.current + transform.rotation * new Vector3(0, 0, -dist.current); }