A game about forced loneliness, made by TACStudios
1using UnityEngine.InputSystem.LowLevel; 2 3namespace UnityEngine.InputSystem.Controls 4{ 5 /// <summary> 6 /// A control reading a <see cref="double"/>. 7 /// </summary> 8 public class DoubleControl : InputControl<double> 9 { 10 /// <summary> 11 /// Default-initialize the control. 12 /// </summary> 13 public DoubleControl() 14 { 15 m_StateBlock.format = InputStateBlock.FormatDouble; 16 } 17 18 /// <inheritdoc/> 19 public override unsafe double ReadUnprocessedValueFromState(void* statePtr) 20 { 21 return m_StateBlock.ReadDouble(statePtr); 22 } 23 24 /// <inheritdoc/> 25 public override unsafe void WriteValueIntoState(double value, void* statePtr) 26 { 27 m_StateBlock.WriteDouble(statePtr, value); 28 } 29 } 30}