A game about forced loneliness, made by TACStudios
1using UnityEngine.Scripting; 2 3namespace UnityEngine.InputSystem.Processors 4{ 5 /// <summary> 6 /// An input processor that inverts its input value. 7 /// </summary> 8 /// <remarks> 9 /// This process is registered (see <see cref="InputSystem.RegisterProcessor{T}"/> as "invert" by default. 10 /// 11 /// <example> 12 /// <code> 13 /// // Bind to the gamepad's left trigger such that it returns inverted values. 14 /// new InputAction(binding: "&lt;Gamepad&gt;/leftTrigger", processors="invert"); 15 /// </code> 16 /// </example> 17 /// </remarks> 18 public class InvertProcessor : InputProcessor<float> 19 { 20 /// <summary> 21 /// Return the inverted value of <paramref name="value"/>. 22 /// </summary> 23 /// <param name="value">Input value.</param> 24 /// <param name="control">Ignored.</param> 25 /// <returns>Invert value.</returns> 26 public override float Process(float value, InputControl control) 27 { 28 return value * -1.0f; 29 } 30 31 /// <inheritdoc/> 32 public override string ToString() 33 { 34 return "Invert()"; 35 } 36 } 37}