public void activeCamera(GameCamera camera, bool active)
 {
     if (camera == null)
     {
         return;
     }
     if (mNGUICamera != null || mUGUICamera != null)
     {
         OT.ACTIVE(camera, active);
         // 如果有非UI摄像机的音频监听组件启用,则禁用UI摄像机的音频监听组件
         bool otherCameraListenerEnabled = false;
         foreach (var item in mCameraList)
         {
             if (item != mUGUICamera && item != mNGUICamera)
             {
                 if (item.isActive() && item.isUnityComponentEnabled <AudioListener>())
                 {
                     otherCameraListenerEnabled = true;
                     break;
                 }
             }
         }
         // 设置UI摄像机的音频监听组件
         if (mNGUICamera != null && mNGUICamera.isActive())
         {
             mNGUICamera.enableUnityComponent <AudioListener>(!otherCameraListenerEnabled);
         }
         if (mUGUICamera != null && mUGUICamera.isActive())
         {
             mUGUICamera.enableUnityComponent <AudioListener>(!otherCameraListenerEnabled);
         }
     }
 }
Beispiel #2
0
 public void activeCamera(GameCamera camera, bool active)
 {
     if (camera == null)
     {
         return;
     }
     if (mUGUICamera != null)
     {
         OT.ACTIVE(camera, active);
         // 如果有非UI摄像机的音频监听组件启用,则禁用UI摄像机的音频监听组件
         bool otherCameraListenerEnabled = false;
         int  count = mCameraList.Count;
         for (int i = 0; i < count; ++i)
         {
             GameCamera item = mCameraList[i];
             if (item != mUGUICamera)
             {
                 if (item.isActive() && item.isUnityComponentEnabled <AudioListener>())
                 {
                     otherCameraListenerEnabled = true;
                     break;
                 }
             }
         }
         // 设置UI摄像机的音频监听组件
         if (mUGUICamera != null && mUGUICamera.isActive())
         {
             mUGUICamera.enableUnityComponent <AudioListener>(!otherCameraListenerEnabled);
         }
     }
 }
 public void activeBlurCamera(bool ngui, bool active)
 {
     if (ngui)
     {
         OT.ACTIVE(mNGUIBlurCamera, active);
     }
     else
     {
         OT.ACTIVE(mUGUIBlurCamera, active);
     }
 }
Beispiel #4
0
 public void activeBlurCamera(bool active)
 {
     OT.ACTIVE(mUGUIBlurCamera, active);
 }