Esempio n. 1
0
    //外部状态强制切换
    private void HandleModeForceSwitch(CameraMode mode, CameraContext context = null)
    {
        if (!Reset(false))
        {
            return;
        }
        BaseCameraController camCtrl = CameraUtil.GetCamCtrl(mode);

        if (camCtrl.Enable(false) && camCtrl.CheckContext(context))
        {
            SwitchCamMode(mode, context);
        }
    }
Esempio n. 2
0
 //内部状态切换
 private void RefreshCameraMode(CameraContext context = null)
 {
     if (!Reset(false))
     {
         return;
     }
     for (int i = 0; i < camCtrl.AllowChangeList.Count; i++)
     {
         BaseCameraController canCtrl = CameraUtil.GetCamCtrl(camCtrl.AllowChangeList[i]);
         if (canCtrl.Enable(true) && canCtrl.CheckContext(context))
         {
             SwitchCamMode(camCtrl.AllowChangeList[i], context);
             break;
         }
     }
 }