Beispiel #1
0
    public void Awake()
    {
        fixTo        = GetComponent <CamFixTo>();
        smoothFollow = GetComponent <CamSmoothFollow>();
        //angle = Mathf.Rad2Deg * 2 * Mathf.Atan(Mathf.Tan(center.camera.fieldOfView * Mathf.Deg2Rad / 2) * center.camera.aspect);

        // AppController.Instance.AdminInput.OpenCamSettings += ToggleCamSettings;
        if (AppController.Instance.appSettings.projectorBlend)
        {
            AdminSettings.Instance.displayType = AdminScreen.DisplayType.PARABOLIC;
        }
        else
        {
            AdminSettings.Instance.displayType = AdminScreen.DisplayType.FLAT;
        }
        cameraSetup = AdminSettings.Instance.displayType;



        SetCameraType(AdminSettings.Instance.displayType, AdminSettings.Instance.selectFov);

        SetFarClip(AdminSettings.Instance.camFarClip);

        SetNearClip(AdminSettings.Instance.camNearClip);

        // AddAdditionalCameras();
    }
Beispiel #2
0
 void Start()
 {
     m_currCamera             = DefaultCamera;
     m_lastShowMirrors        = showMirrors;
     m_lastImageEffects       = enableImageEffects;
     m_currCamera             = DefaultCamera;
     m_lastTarget             = Target;
     m_scrFixTo               = GetComponent <CamFixTo>() as CamFixTo;
     m_scrSmoothFollow        = GetComponent <CamSmoothFollow>() as CamSmoothFollow;
     m_scrMouseOrbit          = GetComponent <CamMouseOrbit>() as CamMouseOrbit;
     m_scrSmoothLookAt        = GetComponent <CamSmoothLookAt>() as CamSmoothLookAt;
     m_scrFreeView            = GetComponent <CamFreeView>() as CamFreeView;
     m_scrSmoothLookAtFromPos = GetComponent <CamSmoothLookAtFromPos>() as CamSmoothLookAtFromPos;
     m_cameraScript           = new MonoBehaviour[m_numCameras];
     m_cameraScript[0]        = m_scrFixTo;
     m_cameraScript[1]        = m_scrSmoothFollow;
     m_cameraScript[2]        = m_scrMouseOrbit;
     m_cameraScript[3]        = m_scrSmoothLookAt;
     m_cameraScript[4]        = m_scrFreeView;
     m_cameraScript[5]        = m_scrSmoothLookAtFromPos;
     if (MapCamera)
     {
         m_scrMapFollow = MapCamera.GetComponent <CamSmoothFollow>() as CamSmoothFollow;
     }
     if (MirrorLeftTex)
     {
         MirrorLeftTex.enabled = false;
     }
     if (MirrorRightTex)
     {
         MirrorRightTex.enabled = false;
     }
     if (MirrorRearTex)
     {
         MirrorRearTex.enabled = false;
     }
     if (Target)
     {
         UpdateTarget();
     }
     for (int i = 0; i < ImageEffects.Length; i++)
     {
         ImageEffects[i].enabled = enableImageEffects;
     }
     for (int i = 0; i < m_numCameras; i++)
     {
         m_cameraScript[i].enabled = false;
     }
     m_cameraScript[m_currCamera].enabled = true;
 }
Beispiel #3
0
    void Start()
    {
        cam          = GetComponent <Camera>();
        fixTo        = GetComponent <CamFixTo>();
        smoothFollow = GetComponent <CamSmoothFollow>();

        Init();
        ViewInside();
        SwitchView(CameraView.THIRDPERSON);

        SetCameraType(selectFov);

        carObject.GetComponent <CarInputController>()[InputEvent.CHANGE_CAM_VIEW].Press += SwitchView;
    }
 void Start()
 {
     m_currCamera = DefaultCamera;
     m_lastShowMirrors = showMirrors;
     m_lastImageEffects = enableImageEffects;
     m_currCamera = DefaultCamera;
     m_lastTarget = Target;
     m_scrFixTo = GetComponent<CamFixTo>() as CamFixTo;
     m_scrSmoothFollow = GetComponent<CamSmoothFollow>() as CamSmoothFollow;
     m_scrMouseOrbit = GetComponent<CamMouseOrbit>() as CamMouseOrbit;
     m_scrSmoothLookAt = GetComponent<CamSmoothLookAt>() as CamSmoothLookAt;
     m_scrFreeView = GetComponent<CamFreeView>() as CamFreeView;
     m_scrSmoothLookAtFromPos = GetComponent<CamSmoothLookAtFromPos>() as CamSmoothLookAtFromPos;
     m_cameraScript = new MonoBehaviour[m_numCameras];
     m_cameraScript[0] = m_scrFixTo;
     m_cameraScript[1] = m_scrSmoothFollow;
     m_cameraScript[2] = m_scrMouseOrbit;
     m_cameraScript[3] = m_scrSmoothLookAt;
     m_cameraScript[4] = m_scrFreeView;
     m_cameraScript[5] = m_scrSmoothLookAtFromPos;
     if (MapCamera)
         m_scrMapFollow = MapCamera.GetComponent<CamSmoothFollow>() as CamSmoothFollow;
     if (MirrorLeftTex)
         MirrorLeftTex.enabled = false;
     if (MirrorRightTex)
         MirrorRightTex.enabled = false;
     if (MirrorRearTex)
         MirrorRearTex.enabled = false;
     if (Target)
         UpdateTarget();
     for (int i = 0; i < ImageEffects.Length; i++)
         ImageEffects[i].enabled = enableImageEffects;
     for (int i = 0; i < m_numCameras; i++)
         m_cameraScript[i].enabled = false;
     m_cameraScript[m_currCamera].enabled = true;
 }