Exemplo n.º 1
0
 private void OnAnalogInput(TranslatedInput translatedInput, float newInputValue)
 {
     translatedInput.AxisValue = newInputValue;
     if (OnAnalogInputEvent != null)
     {
         OnAnalogInputEvent(translatedInput.InputKey, translatedInput.AxisValue);
     }
 }
Exemplo n.º 2
0
 private void OnButtonInput(TranslatedInput translatedInput, bool newPressed)
 {
     if (translatedInput.Pressed != newPressed)
     {
         translatedInput.Pressed = newPressed;
         if (OnButtonInputEvent != null)
         {
             OnButtonInputEvent(translatedInput.InputKey, translatedInput.Pressed);
         }
     }
 }
Exemplo n.º 3
0
 private void OnMouseInput(TranslatedInput translatedInput, Vector3 newSpace)
 {
     if (!Mathf.Approximately(translatedInput.Coordinate.sqrMagnitude, newSpace.sqrMagnitude))
     {
         translatedInput.Coordinate = newSpace;
         if (OnMouseInputEvent != null)
         {
             OnMouseInputEvent(translatedInput.InputKey, translatedInput.Coordinate);
         }
     }
 }