A game about forced loneliness, made by TACStudios
1using System.Runtime.InteropServices;
2using UnityEngine.InputSystem.Utilities;
3
4namespace UnityEngine.InputSystem.LowLevel
5{
6 [StructLayout(LayoutKind.Explicit, Size = kSize)]
7 internal struct WarpMousePositionCommand : IInputDeviceCommandInfo
8 {
9 public static FourCC Type { get { return new FourCC('W', 'P', 'M', 'S'); } }
10
11 internal const int kSize = InputDeviceCommand.kBaseCommandSize + sizeof(float) * 2;
12
13 [FieldOffset(0)]
14 public InputDeviceCommand baseCommand;
15
16 [FieldOffset(InputDeviceCommand.kBaseCommandSize)]
17 public Vector2 warpPositionInPlayerDisplaySpace;
18
19 public FourCC typeStatic
20 {
21 get { return Type; }
22 }
23
24 public static WarpMousePositionCommand Create(Vector2 position)
25 {
26 return new WarpMousePositionCommand
27 {
28 baseCommand = new InputDeviceCommand(Type, kSize),
29 warpPositionInPlayerDisplaySpace = position
30 };
31 }
32 }
33}