示例#1
0
 internal void Draw()
 {
     if (Debugger.IsAttached)
     {
         CurrentFrame.Draw();
     }
     else
     {
         try
         {
             CurrentFrame.Draw();
         }
         catch (Exception error)
         {
             game.ProcessReportError(error);
         }
     }
 }
示例#2
0
 //[CallOnThread("Sound")]
 bool DoSound()
 {
     if (Debugger.IsAttached)
     {
         Sound();
     }
     else
     {
         try
         {
             Sound();
         }
         catch (Exception error)
         {
             // Unblock anyone waiting for us, report error and die.
             State.SignalTerminate();
             Game.ProcessReportError(error);
             return(false);
         }
     }
     return(true);
 }
示例#3
0
 private bool DoLoad()
 {
     if (Debugger.IsAttached)
     {
         Load();
     }
     else
     {
         try
         {
             Load();
         }
         catch (Exception error)
         {
             // Unblock anyone waiting for us, report error and die.
             cancellationTokenSource.Cancel();
             processState.SignalTerminate();
             game.ProcessReportError(error);
             return(false);
         }
     }
     return(true);
 }