Beispiel #1
0
        public void MistySpeak(string message)
        {
#if DEBUG_MESSAGES
            try
            {
                _misty.Speak(message, true, "na", OnResponse);
            }
            catch (Exception) { }
#endif
        }
Beispiel #2
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)
			{
				return;
			}

			_misty.SkillLogger.Log($"ForceDriving : BumpCallback: => {bumpEvent.IsContacted}");
			_misty.Stop(null);

			switch(bumpEvent.SensorPosition)
			{
				case BumpSensorPosition.FrontRight:
					//_misty.PlayAudio("s_PhraseHello.wav", 100, null);
					_misty.Speak("Front Right", true, "1", null);
					break;
				case BumpSensorPosition.FrontLeft:
					//_misty.PlayAudio("s_PhraseUhOh.wav", 100, null);
					_misty.Speak("Front Left", true, "1", null);
					break;
				case BumpSensorPosition.BackRight:
					//_misty.PlayAudio("s_Love.wav", 100, null);
					_misty.Speak("Back Right", true, "1", null);
					break;
				case BumpSensorPosition.BackLeft:
					//_misty.PlayAudio("s_Boredom.wav", 100, null);
					_misty.Speak("Back Left", true, "1", null);
					break;
			}
		}