Esempio n. 1
0
 /// <summary>
 /// Output information content via audio if input was received 
 /// for a device currently in this haptic rectangle
 /// </summary>
 /// <param name="haptiQ"></param>
 /// <param name="gestureType"></param>
 public override void handlePress(HaptiQ haptiQ, PRESSURE_GESTURE_TYPE gestureType)
 {
     Tuple<STATE, IBehaviour> HaptiQState = _HaptiQBehaviours.ContainsKey(haptiQ.getID()) ? _HaptiQBehaviours[haptiQ.getID()] : null;
     if (pointIsInside(haptiQ.position) && HaptiQState != null && HaptiQState.Item1 == STATE.down)
     {
         if (_action != null)
         {
             _action.run(haptiQ.getID(), gestureType, haptiQ.getCurrentPressureData());
         }
         else
         {
             SpeechOutput.Instance.speak(information);
         }
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Handle an actuator press. 
 /// Note: Multiple presses are not supported, yet.
 /// </summary>
 /// <param name="haptiQ"></param>
 /// <param name="gestureType"></param>
 public virtual void handlePress(HaptiQ haptiQ, PRESSURE_GESTURE_TYPE gestureType)
 {
     Tuple<STATE, IBehaviour> HaptiQState = _HaptiQBehaviours.ContainsKey(haptiQ.getID()) ? _HaptiQBehaviours[haptiQ.getID()] : null;
     if (pointIsInside(haptiQ.position) && HaptiQState != null && HaptiQState.Item1 == STATE.down)
     {
         if (_action != null)
         {
             _action.run(haptiQ.getID(), gestureType, haptiQ.getCurrentPressureData());
         }
     }
 }