Ejemplo n.º 1
0
        private void SetCameraEnable(CameraMouseControl camera)
        {
            if (camera != null)
            {
                var virtualCam = ControlCamera.GetComponent <VirtualCamera>();
                if (virtualCam != null)
                {
                    virtualCam.enabled = Settings.Current.WebCamEnabled;
                }
                camera.gameObject.SetActive(true);
                if (CurrentCameraControl != null && CurrentCameraControl != camera)
                {
                    CurrentCameraControl.gameObject.SetActive(false);
                }
                camera.GetComponent <CameraMouseControl>().enabled = true;
                CurrentCameraControl = camera;
                SetCameraMirrorEnable(Settings.Current.CameraMirrorEnable);

                VMCEvents.OnCameraChanged?.Invoke(ControlCamera);
            }
        }
Ejemplo n.º 2
0
 private void OnEnable()
 {
     Current = this;
 }
Ejemplo n.º 3
0
 public void ApplyTo(CameraMouseControl target)
 {
     target.LookOffset = Offset; target.CameraDistance = Distance;
 }
Ejemplo n.º 4
0
 public void Set(CameraMouseControl target)
 {
     Offset = target.LookOffset; Distance = target.CameraDistance;
 }
Ejemplo n.º 5
0
 public static LookTargetSettings Create(CameraMouseControl target)
 {
     return(new LookTargetSettings {
         Offset = target.LookOffset, Distance = target.CameraDistance
     });
 }