Exemplo n.º 1
0
    public void DeleteCamera(MultiObjectFollow cam)
    {
        ActiveCameras.Remove(cam);
        Destroy(cam.gameObject);

        AdjustCameraSizes();
    }
Exemplo n.º 2
0
 public void SetCameras(MultiObjectFollow mof, Rect rect)
 {
     mof.m_Camera.rect       = rect;
     mof.uiCamera.UICam.rect = mof.m_Camera.rect;
     //if (mof.uiCamera.osimc == null)
     //    mof.uiCamera.osimc = mof.uiCamera.osi.gameObject.GetComponent<OffScreenIndicatorManagerCanvas>();
     // FIXME mof.uiCamera.osimc.UpdateScreen();
 }
Exemplo n.º 3
0
 void AdjustCameraSizes()
 {
     if (CameraCount() == 1)
     {
         SetCameras(p1Cam, Single);
     }
     else if (CameraCount() == 2)
     {
         if (mode == CamMode.Horizontal)
         {
             SetCameras(p1Cam, TopHalf);
             SetCameras(p2Cam, BottomHalf);
         }
         else
         {
             SetCameras(p1Cam, LeftHalf);
             SetCameras(p2Cam, RightHalf);
         }
     }
     else if (CameraCount() == 3)
     {
         if (mode == CamMode.Horizontal)
         {
             SetCameras(p1Cam, TopHalf);
             SetCameras(p2Cam, BottomLeft);
             SetCameras(p3Cam, BottomRight);
         }
         else
         {
             SetCameras(p1Cam, LeftHalf);
             SetCameras(p2Cam, TopRight);
             SetCameras(p3Cam, BottomRight);
         }
     }
     else if (CameraCount() == 4)
     {
         SetCameras(p1Cam, TopLeft);
         SetCameras(p2Cam, TopRight);
         SetCameras(p3Cam, BottomLeft);
         SetCameras(p4Cam, BottomRight);
     }
     //maybe not necessary
     for (int i = 0; i < ActiveCameras.Count; i++)
     {
         MultiObjectFollow cam = ActiveCameras[i];
         if (cam.uiCamera != null)
         {
             StartCoroutine(displayCameraDammit(cam.uiCamera.UICam));
         }
     }
 }