A game about forced loneliness, made by TACStudios
1using UnityEngine.InputSystem.Layouts; 2using UnityEngine.Scripting; 3 4namespace UnityEngine.InputSystem.Controls 5{ 6 /// <summary> 7 /// Delta controls are a two-dimensional motion vector that accumulate within a frame 8 /// and reset at the beginning of a frame. You can read the values from a delta control 9 /// using the inherited members from Vector2Control or InputControl. 10 /// </summary> 11 /// <see cref="Pointer.delta"/> 12 /// <seealso cref="Mouse.scroll"/> 13 [Preserve] 14 public class DeltaControl : Vector2Control 15 { 16 /// <summary> 17 /// A synthetic axis representing the upper half of the Y axis value, i.e. the 0 to 1 range. 18 /// </summary> 19 /// <value>Control representing the control's upper half Y axis.</value> 20 /// <remarks> 21 /// The control is marked as <see cref="InputControl.synthetic"/>. 22 /// </remarks> 23 [InputControl(useStateFrom = "y", parameters = "clamp=1,clampMin=0,clampMax=3.402823E+38", synthetic = true, displayName = "Up")] 24 [Preserve] 25 public AxisControl up { get; set; } 26 27 /// <summary> 28 /// A synthetic axis representing the lower half of the Y axis value, i.e. the 0 to -1 range (inverted). 29 /// </summary> 30 /// <value>Control representing the control's lower half Y axis.</value> 31 /// <remarks> 32 /// The control is marked as <see cref="InputControl.synthetic"/>. 33 /// </remarks> 34 [InputControl(useStateFrom = "y", parameters = "clamp=1,clampMin=-3.402823E+38,clampMax=0,invert", synthetic = true, displayName = "Down")] 35 [Preserve] 36 public AxisControl down { get; set; } 37 38 /// <summary> 39 /// A synthetic axis representing the left half of the X axis value, i.e. the 0 to -1 range (inverted). 40 /// </summary> 41 /// <value>Control representing the control's left half X axis.</value> 42 /// <remarks> 43 /// The control is marked as <see cref="InputControl.synthetic"/>. 44 /// </remarks> 45 [InputControl(useStateFrom = "x", parameters = "clamp=1,clampMin=-3.402823E+38,clampMax=0,invert", synthetic = true, displayName = "Left")] 46 [Preserve] 47 public AxisControl left { get; set; } 48 49 /// <summary> 50 /// A synthetic axis representing the right half of the X axis value, i.e. the 0 to 1 range. 51 /// </summary> 52 /// <value>Control representing the control's right half X axis.</value> 53 /// <remarks> 54 /// The control is marked as <see cref="InputControl.synthetic"/>. 55 /// </remarks> 56 [InputControl(useStateFrom = "x", parameters = "clamp=1,clampMin=0,clampMax=3.402823E+38", synthetic = true, displayName = "Right")] 57 [Preserve] 58 public AxisControl right { get; set; } 59 60 protected override void FinishSetup() 61 { 62 base.FinishSetup(); 63 64 up = GetChildControl<AxisControl>("up"); 65 down = GetChildControl<AxisControl>("down"); 66 left = GetChildControl<AxisControl>("left"); 67 right = GetChildControl<AxisControl>("right"); 68 } 69 } 70}