コード例 #1
0
ファイル: CameraViews.cs プロジェクト: houkii/Space-Transport
 private void SetActiveCameraView(CameraView view, Action onViewSetupCompleted = null)
 {
     if (ActiveView != null)
     {
         if (ActiveView.GetType() != view.GetType())
         {
             ActiveView.Disable();
             GC.SuppressFinalize((object)ActiveView);
             ActiveView = view;
             ActiveView.Enable(onViewSetupCompleted);
             OnCameraViewChanged?.Invoke(view);
         }
     }
     else
     {
         ActiveView = view;
         ActiveView.Enable(onViewSetupCompleted);
         OnCameraViewChanged?.Invoke(view);
     }
 }
コード例 #2
0
 /// Returns whether the current view is the normal one, i.e., the view from above
 public bool IsNormalView() => cameraView.GetType() == typeof(NormalView);