/// <summary>
 /// Input source lost callback for the cursor
 /// </summary>
 /// <param name="eventData"></param>
 public virtual void OnSourceLost(SourceStateEventData eventData)
 {
     if (Pointer.OwnsInput(eventData))
     {
         visibleHandsCount--;
         if (visibleHandsCount == 0)
         {
             IsHandVisible     = false;
             IsInputSourceDown = false;
         }
     }
 }
 public void OnSourceLost(SourceStateEventData eventData)
 {
     if (currentInputSource != null && eventData.SourceId == currentInputSourceId)
     {
         if (RepositionManager.Instance.GetWallStatusMode(instanceId) == WallStatusModes.DRAGGING)
         {
             // Remove self as a modal input handler
             //InputManager.Instance.PopModalInputHandler();
             InputManager.Instance.RemoveMultiModalInputHandler(currentInputSourceId);
             RepositionManager.Instance.SetWallMode(gameObject, WallStatusModes.LOCKED);
         }
     }
 }
Example #3
0
        private void InitializeEventDatas()
        {
            inputEventData         = new InputEventData(EventSystem.current);
            sourceClickedEventData = new InputClickedEventData(EventSystem.current);
            sourceStateEventData   = new SourceStateEventData(EventSystem.current);
            manipulationEventData  = new ManipulationEventData(EventSystem.current);
            navigationEventData    = new NavigationEventData(EventSystem.current);
            holdEventData          = new HoldEventData(EventSystem.current);
#if UNITY_WSA || UNITY_STANDALONE_WIN
            speechKeywordRecognizedEventData = new SpeechKeywordRecognizedEventData(EventSystem.current);
            dictationEventData = new DictationEventData(EventSystem.current);
#endif
        }
 private void InitializeEventDatas()
 {
     inputEventData           = new InputEventData(EventSystem.current);
     sourceClickedEventData   = new InputClickedEventData(EventSystem.current);
     sourceStateEventData     = new SourceStateEventData(EventSystem.current);
     sourceRotationEventData  = new SourceRotationEventData(EventSystem.current);
     sourcePositionEventData  = new SourcePositionEventData(EventSystem.current);
     manipulationEventData    = new ManipulationEventData(EventSystem.current);
     navigationEventData      = new NavigationEventData(EventSystem.current);
     holdEventData            = new HoldEventData(EventSystem.current);
     pointerSpecificEventData = new PointerSpecificEventData(EventSystem.current);
     inputPositionEventData   = new InputPositionEventData(EventSystem.current);
     selectPressedEventData   = new SelectPressedEventData(EventSystem.current);
 }
Example #5
0
        private void InitializeEventDatas()
        {
            inputEventData          = new InputEventData(EventSystem.current);
            sourceClickedEventData  = new InputClickedEventData(EventSystem.current);
            sourceStateEventData    = new SourceStateEventData(EventSystem.current);
            manipulationEventData   = new ManipulationEventData(EventSystem.current);
            navigationEventData     = new NavigationEventData(EventSystem.current);
            holdEventData           = new HoldEventData(EventSystem.current);
            gamePadEventData        = new GamePadEventData(EventSystem.current);
            xboxControllerEventData = new XboxControllerEventData(EventSystem.current);
#if UNITY_WSA || UNITY_STANDALONE_WIN
            speechEventData    = new SpeechEventData(EventSystem.current);
            dictationEventData = new DictationEventData(EventSystem.current);
#endif
        }
Example #6
0
        private void InitializeEventDatas()
        {
            inputEventData           = new InputEventData(EventSystem.current);
            sourceClickedEventData   = new InputClickedEventData(EventSystem.current);
            sourceStateEventData     = new SourceStateEventData(EventSystem.current);
            manipulationEventData    = new ManipulationEventData(EventSystem.current);
            navigationEventData      = new NavigationEventData(EventSystem.current);
            holdEventData            = new HoldEventData(EventSystem.current);
            pointerSpecificEventData = new PointerSpecificEventData(EventSystem.current);
            inputPositionEventData   = new InputPositionEventData(EventSystem.current);
            selectPressedEventData   = new SelectPressedEventData(EventSystem.current);
            sourceRotationEventData  = new SourceRotationEventData(EventSystem.current);
            sourcePositionEventData  = new SourcePositionEventData(EventSystem.current);
            xboxControllerEventData  = new XboxControllerEventData(EventSystem.current);
#if UNITY_WSA || UNITY_STANDALONE_WIN
            speechEventData    = new SpeechEventData(EventSystem.current);
            dictationEventData = new DictationEventData(EventSystem.current);
#endif
        }
Example #7
0
        public void OnSourceLost(SourceStateEventData eventData)
        {
            //should be functionally the same as input up for our cases, modulo the datatype
            //update the input sources
            this.currentInputSources.Remove(eventData.SourceId);
            this.handsPositions.Remove(eventData.SourceId);


            if (this.currentInputSources.Count == 0)
            {
                StopDragging();
            }
            else if (this.currentInputSources.Count == 1)
            {
                StopScaling();
                StartDragging(); //TODO: this isn't restarting dragging for some reason
            }
            else
            {
                throw new Exception("OH MY GOD YOU HAVE THREE HANDS AGAIN WHY!!!");
            }
        }
 public void OnSourceLost(SourceStateEventData eventData)
 {
     throw new NotImplementedException();
 }
Example #9
0
 public void OnSourceDetected(SourceStateEventData eventData)
 {
     // Nothing to do
 }
Example #10
0
 public void OnSourceLost(SourceStateEventData eventData)
 {
     StopRotation();
 }
Example #11
0
 void ISourceStateHandler.OnSourceDetected(SourceStateEventData eventData)
 {
     // Nothing to do on source detected.
 }
Example #12
0
 /// <summary>
 /// Input source detected callback for the cursor
 /// </summary>
 /// <param name="eventData"></param>
 public virtual void OnSourceDetected(SourceStateEventData eventData)
 {
     visibleHandsCount++;
     IsHandVisible = true;
 }
Example #13
0
 public void OnSourceDetected(SourceStateEventData eventData)
 {
 }
 public virtual void OnSourceDetected(SourceStateEventData eventData)
 {
     // Override and name your GamePad source.
 }
 public virtual void OnSourceLost(SourceStateEventData eventData)
 {
     GamePadName = string.Empty;
 }
Example #16
0
 public void OnSourceLost(SourceStateEventData eventData)
 {
     RemoveSourceIdFromHandMap(eventData.SourceId);
     UpdateStateMachine();
     eventData.Use();
 }
 public void OnSourceLost(SourceStateEventData eventData)
 {
     if (currentInputSource != null && eventData.SourceId == currentInputSourceId)
     {
         StopDragging();
     }
 }
 public void OnSourceDetected(SourceStateEventData eventData)
 {
     // Nothing to do
 }
Example #19
0
 /// <summary>
 /// Input source detected callback for the cursor
 /// </summary>
 /// <param name="eventData"></param>
 public virtual void OnSourceDetected(SourceStateEventData eventData)
 {
     visibleHandsCount++;
     IsHandVisible = true;
 }
Example #20
0
 /// <summary>
 /// Input source lost callback for the cursor
 /// </summary>
 /// <param name="eventData"></param>
 public virtual void OnSourceLost(SourceStateEventData eventData)
 {
     visibleHandsCount--;
     if (visibleHandsCount == 0)
     {
         IsHandVisible = false;
     }
 }