Exemplo n.º 1
0
 private void JoypadDevice_AnalogStickDidMove(JoypadDevice device, JoyInputIdentifier stick, JoypadStickPosition newPosition)
 {
     float normalizedDistance = newPosition.Distance / 55.0f;	// Move this into the SDK.
     moveX = normalizedDistance * Mathf.Cos(newPosition.Angle);
     moveY = normalizedDistance * Mathf.Sin(newPosition.Angle);
     print(string.Format("Analog Stick moved - Distance: {0}  Angle:{1}", normalizedDistance, newPosition.Angle));
 }
Exemplo n.º 2
0
 private void JoypadDevice_DpadButtonDown(JoypadDevice device, JoyInputIdentifier dpad, JoyDpadButton dpadButton)
 {
     print(string.Format("Dpad {0} pressed {1}", dpad, dpadButton));
 }
Exemplo n.º 3
0
 private void JoypadDevice_ButtonUp(JoypadDevice device, JoyInputIdentifier button)
 {
     print(string.Format("Button {0} Released", button));
 }
Exemplo n.º 4
0
 private void JoypadDevice_ButtonDown(JoypadDevice device, JoyInputIdentifier button)
 {
     print(string.Format("Button {0} Pressed", button));
 }