Global Game Jam 2022
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

304 lines
11 KiB

  1. // GENERATED AUTOMATICALLY FROM 'Assets/Settings/PlayerInput.inputactions'
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using UnityEngine.InputSystem;
  6. using UnityEngine.InputSystem.Utilities;
  7. public class @PlayerInput : IInputActionCollection, IDisposable
  8. {
  9. public InputActionAsset asset { get; }
  10. public @PlayerInput()
  11. {
  12. asset = InputActionAsset.FromJson(@"{
  13. ""name"": ""PlayerInput"",
  14. ""maps"": [
  15. {
  16. ""name"": ""Level"",
  17. ""id"": ""2bc60834-e09f-4981-affb-635cad7ffbfd"",
  18. ""actions"": [
  19. {
  20. ""name"": ""Move"",
  21. ""type"": ""Value"",
  22. ""id"": ""d1943f36-92e5-4335-a3f3-dd2e9e553ba6"",
  23. ""expectedControlType"": ""Vector2"",
  24. ""processors"": """",
  25. ""interactions"": """"
  26. },
  27. {
  28. ""name"": ""Jump"",
  29. ""type"": ""Button"",
  30. ""id"": ""e7ae7276-c64d-43bb-8719-ef3178e194a0"",
  31. ""expectedControlType"": ""Button"",
  32. ""processors"": """",
  33. ""interactions"": """"
  34. }
  35. ],
  36. ""bindings"": [
  37. {
  38. ""name"": ""WASD"",
  39. ""id"": ""a50ea126-50e2-4f31-9167-ac757787a3e6"",
  40. ""path"": ""2DVector"",
  41. ""interactions"": """",
  42. ""processors"": """",
  43. ""groups"": """",
  44. ""action"": ""Move"",
  45. ""isComposite"": true,
  46. ""isPartOfComposite"": false
  47. },
  48. {
  49. ""name"": ""up"",
  50. ""id"": ""f7f33275-3f13-451c-8219-e1b34d39139c"",
  51. ""path"": ""<Keyboard>/w"",
  52. ""interactions"": """",
  53. ""processors"": """",
  54. ""groups"": """",
  55. ""action"": ""Move"",
  56. ""isComposite"": false,
  57. ""isPartOfComposite"": true
  58. },
  59. {
  60. ""name"": ""down"",
  61. ""id"": ""73900688-a28e-40cf-ace2-05ad1b118594"",
  62. ""path"": ""<Keyboard>/s"",
  63. ""interactions"": """",
  64. ""processors"": """",
  65. ""groups"": """",
  66. ""action"": ""Move"",
  67. ""isComposite"": false,
  68. ""isPartOfComposite"": true
  69. },
  70. {
  71. ""name"": ""left"",
  72. ""id"": ""c4e7f05b-1733-4e36-b752-6e0cf95f477e"",
  73. ""path"": ""<Keyboard>/a"",
  74. ""interactions"": """",
  75. ""processors"": """",
  76. ""groups"": """",
  77. ""action"": ""Move"",
  78. ""isComposite"": false,
  79. ""isPartOfComposite"": true
  80. },
  81. {
  82. ""name"": ""right"",
  83. ""id"": ""f889cf6b-20aa-4169-a5d2-3bdae2e636e3"",
  84. ""path"": ""<Keyboard>/d"",
  85. ""interactions"": """",
  86. ""processors"": """",
  87. ""groups"": """",
  88. ""action"": ""Move"",
  89. ""isComposite"": false,
  90. ""isPartOfComposite"": true
  91. },
  92. {
  93. ""name"": ""Arrow"",
  94. ""id"": ""9328658c-a019-4f76-b35b-5f023f9de6e0"",
  95. ""path"": ""2DVector"",
  96. ""interactions"": """",
  97. ""processors"": """",
  98. ""groups"": """",
  99. ""action"": ""Move"",
  100. ""isComposite"": true,
  101. ""isPartOfComposite"": false
  102. },
  103. {
  104. ""name"": ""up"",
  105. ""id"": ""16f6fb9d-eb25-445d-9313-fdf19a51b67c"",
  106. ""path"": ""<Keyboard>/upArrow"",
  107. ""interactions"": """",
  108. ""processors"": """",
  109. ""groups"": """",
  110. ""action"": ""Move"",
  111. ""isComposite"": false,
  112. ""isPartOfComposite"": true
  113. },
  114. {
  115. ""name"": ""down"",
  116. ""id"": ""b8ce9a70-56c3-42da-9960-45d9791c903e"",
  117. ""path"": ""<Keyboard>/downArrow"",
  118. ""interactions"": """",
  119. ""processors"": """",
  120. ""groups"": """",
  121. ""action"": ""Move"",
  122. ""isComposite"": false,
  123. ""isPartOfComposite"": true
  124. },
  125. {
  126. ""name"": ""left"",
  127. ""id"": ""e5dcf5e4-bff0-40ea-8b4f-dce1f8ed5156"",
  128. ""path"": ""<Keyboard>/leftArrow"",
  129. ""interactions"": """",
  130. ""processors"": """",
  131. ""groups"": """",
  132. ""action"": ""Move"",
  133. ""isComposite"": false,
  134. ""isPartOfComposite"": true
  135. },
  136. {
  137. ""name"": ""right"",
  138. ""id"": ""e4bf6a66-4a5d-4d05-baeb-e0db660132da"",
  139. ""path"": ""<Keyboard>/rightArrow"",
  140. ""interactions"": """",
  141. ""processors"": """",
  142. ""groups"": """",
  143. ""action"": ""Move"",
  144. ""isComposite"": false,
  145. ""isPartOfComposite"": true
  146. },
  147. {
  148. ""name"": """",
  149. ""id"": ""f07ab40a-4b61-4c20-9090-d8d96d5ea496"",
  150. ""path"": ""<Gamepad>/leftStick"",
  151. ""interactions"": """",
  152. ""processors"": """",
  153. ""groups"": """",
  154. ""action"": ""Move"",
  155. ""isComposite"": false,
  156. ""isPartOfComposite"": false
  157. },
  158. {
  159. ""name"": """",
  160. ""id"": ""67ec88e9-6ebb-4f16-9f4a-49d4f75af68e"",
  161. ""path"": ""<Keyboard>/space"",
  162. ""interactions"": """",
  163. ""processors"": """",
  164. ""groups"": """",
  165. ""action"": ""Jump"",
  166. ""isComposite"": false,
  167. ""isPartOfComposite"": false
  168. },
  169. {
  170. ""name"": """",
  171. ""id"": ""fdb42cec-2a7c-452a-884c-b08443c104bb"",
  172. ""path"": ""<Keyboard>/w"",
  173. ""interactions"": """",
  174. ""processors"": """",
  175. ""groups"": """",
  176. ""action"": ""Jump"",
  177. ""isComposite"": false,
  178. ""isPartOfComposite"": false
  179. },
  180. {
  181. ""name"": """",
  182. ""id"": ""9ccfba17-299b-47dc-b571-4acf9801cb5e"",
  183. ""path"": ""<Keyboard>/upArrow"",
  184. ""interactions"": """",
  185. ""processors"": """",
  186. ""groups"": """",
  187. ""action"": ""Jump"",
  188. ""isComposite"": false,
  189. ""isPartOfComposite"": false
  190. },
  191. {
  192. ""name"": """",
  193. ""id"": ""6065b818-f9a2-4a58-952b-4054f7f6981a"",
  194. ""path"": ""<Gamepad>/buttonSouth"",
  195. ""interactions"": """",
  196. ""processors"": """",
  197. ""groups"": """",
  198. ""action"": ""Jump"",
  199. ""isComposite"": false,
  200. ""isPartOfComposite"": false
  201. }
  202. ]
  203. }
  204. ],
  205. ""controlSchemes"": []
  206. }");
  207. // Level
  208. m_Level = asset.FindActionMap("Level", throwIfNotFound: true);
  209. m_Level_Move = m_Level.FindAction("Move", throwIfNotFound: true);
  210. m_Level_Jump = m_Level.FindAction("Jump", throwIfNotFound: true);
  211. }
  212. public void Dispose()
  213. {
  214. UnityEngine.Object.Destroy(asset);
  215. }
  216. public InputBinding? bindingMask
  217. {
  218. get => asset.bindingMask;
  219. set => asset.bindingMask = value;
  220. }
  221. public ReadOnlyArray<InputDevice>? devices
  222. {
  223. get => asset.devices;
  224. set => asset.devices = value;
  225. }
  226. public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;
  227. public bool Contains(InputAction action)
  228. {
  229. return asset.Contains(action);
  230. }
  231. public IEnumerator<InputAction> GetEnumerator()
  232. {
  233. return asset.GetEnumerator();
  234. }
  235. IEnumerator IEnumerable.GetEnumerator()
  236. {
  237. return GetEnumerator();
  238. }
  239. public void Enable()
  240. {
  241. asset.Enable();
  242. }
  243. public void Disable()
  244. {
  245. asset.Disable();
  246. }
  247. // Level
  248. private readonly InputActionMap m_Level;
  249. private ILevelActions m_LevelActionsCallbackInterface;
  250. private readonly InputAction m_Level_Move;
  251. private readonly InputAction m_Level_Jump;
  252. public struct LevelActions
  253. {
  254. private @PlayerInput m_Wrapper;
  255. public LevelActions(@PlayerInput wrapper) { m_Wrapper = wrapper; }
  256. public InputAction @Move => m_Wrapper.m_Level_Move;
  257. public InputAction @Jump => m_Wrapper.m_Level_Jump;
  258. public InputActionMap Get() { return m_Wrapper.m_Level; }
  259. public void Enable() { Get().Enable(); }
  260. public void Disable() { Get().Disable(); }
  261. public bool enabled => Get().enabled;
  262. public static implicit operator InputActionMap(LevelActions set) { return set.Get(); }
  263. public void SetCallbacks(ILevelActions instance)
  264. {
  265. if (m_Wrapper.m_LevelActionsCallbackInterface != null)
  266. {
  267. @Move.started -= m_Wrapper.m_LevelActionsCallbackInterface.OnMove;
  268. @Move.performed -= m_Wrapper.m_LevelActionsCallbackInterface.OnMove;
  269. @Move.canceled -= m_Wrapper.m_LevelActionsCallbackInterface.OnMove;
  270. @Jump.started -= m_Wrapper.m_LevelActionsCallbackInterface.OnJump;
  271. @Jump.performed -= m_Wrapper.m_LevelActionsCallbackInterface.OnJump;
  272. @Jump.canceled -= m_Wrapper.m_LevelActionsCallbackInterface.OnJump;
  273. }
  274. m_Wrapper.m_LevelActionsCallbackInterface = instance;
  275. if (instance != null)
  276. {
  277. @Move.started += instance.OnMove;
  278. @Move.performed += instance.OnMove;
  279. @Move.canceled += instance.OnMove;
  280. @Jump.started += instance.OnJump;
  281. @Jump.performed += instance.OnJump;
  282. @Jump.canceled += instance.OnJump;
  283. }
  284. }
  285. }
  286. public LevelActions @Level => new LevelActions(this);
  287. public interface ILevelActions
  288. {
  289. void OnMove(InputAction.CallbackContext context);
  290. void OnJump(InputAction.CallbackContext context);
  291. }
  292. }