예제 #1
0
        /// <summary>
        /// Callback called when the bump sensor is contacted or released
        /// This method only process IsContacted events
        /// </summary>
        /// <param name="bumpEvent"></param>
        private void BumpCallback(IBumpSensorEvent bumpEvent)
        {
            if (bumpEvent.IsContacted)
            {
                _misty.Stop(null);
                switch (bumpEvent.SensorPosition)
                {
                case BumpSensorPosition.FrontRight:
                    _misty.PlayAudio("s_PhraseHello.wav", 100, null);
                    break;

                case BumpSensorPosition.FrontLeft:
                    _misty.PlayAudio("s_PhraseUhOh.wav", 100, null);
                    break;

                case BumpSensorPosition.BackRight:
                    _misty.PlayAudio("s_Love.wav", 100, null);
                    break;

                case BumpSensorPosition.BackLeft:
                    _misty.PlayAudio("s_Boredom.wav", 100, null);
                    break;
                }
            }
        }
 /// <summary>
 /// Do timeout or cancel cleanup
 /// </summary>
 private void DoCleanup()
 {
     _misty.Stop(null);
     _misty.StopKeyPhraseRecognition(null);
     _misty.StopFaceRecognition(null);
     // Unregisters all events
     _misty.UnregisterAllEvents(UnregisterCallback);
     _misty.DisplayImage("e_DefaultContent.jpg", 1, null);
 }
예제 #3
0
		private void DoCleanup()
		{
			_misty.Stop(null);
			_misty.StopKeyPhraseRecognition(null);
			_misty.StopFaceRecognition(null);
		}