public void SaveCamera(CameraStatus status, GameObject camera) { cameraStatus.CopyFrom(status); cameraPosition = camera.transform.position; cameraOrientation = camera.transform.rotation.eulerAngles.z; // cameraTrans = camera.transform; }
public void CopyFrom(CameraStatus status) { focusDelta = status.focusDelta; size = status.size; hasTarget = status.hasTarget; hasOrientation = status.hasOrientation; currentTarget = status.currentTarget; currentOrientation = status.currentOrientation; toTargetMaxDelta = status.toTargetMaxDelta; cameraMaxDelta = status.cameraMaxDelta; sizeCurve = status.sizeCurve; timer = status.timer; }
public void Init(CameraStatus status) { ResetTimer(); focusDelta = status.focusDelta; size = status.size; hasTarget = status.hasTarget; hasOrientation = status.hasOrientation; currentTarget = status.currentTarget; currentOrientation = status.currentOrientation; toTargetMaxDelta = 0.1f; cameraMaxDelta = 999f; sizeCurve = AnimationCurve.Constant(0f, 1f, size); }