예제 #1
0
 // OnApplicationQuit is called when the game shuts down.
 void OnApplicationQuit()
 {
     this.CancelCalibration();
     if (glove != null && glove.IsConnected())
     {
         glove.StopBrakes();
         glove.StopBuzzMotors();
         glove.Disconnect();
         SenseGlove_Debugger.Log("Disconnected the SenseGlove on " + glove.communicator.Address());
     }
     SenseGloveCs.DeviceScanner.CleanUp();
 }
예제 #2
0
 /// <summary> Dispose of resources. </summary>
 private void Dispose()
 {
     this.CancelCalibration();
     if (glove != null && glove.IsConnected())
     {
         glove.StopBrakes();
         glove.StopBuzzMotors();
         glove.Disconnect();
         SenseGlove_Debugger.Log("Disconnected the SenseGlove on " + glove.communicator.Address());
     }
     this.Disconnect();
 }