Exemple #1
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;
 }
 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;
 }