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.

271 lines
9.8 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"": ""67ec88e9-6ebb-4f16-9f4a-49d4f75af68e"",
  150. ""path"": ""<Keyboard>/space"",
  151. ""interactions"": """",
  152. ""processors"": """",
  153. ""groups"": """",
  154. ""action"": ""Jump"",
  155. ""isComposite"": false,
  156. ""isPartOfComposite"": false
  157. },
  158. {
  159. ""name"": """",
  160. ""id"": ""fdb42cec-2a7c-452a-884c-b08443c104bb"",
  161. ""path"": ""<Keyboard>/w"",
  162. ""interactions"": """",
  163. ""processors"": """",
  164. ""groups"": """",
  165. ""action"": ""Jump"",
  166. ""isComposite"": false,
  167. ""isPartOfComposite"": false
  168. }
  169. ]
  170. }
  171. ],
  172. ""controlSchemes"": []
  173. }");
  174. // Level
  175. m_Level = asset.FindActionMap("Level", throwIfNotFound: true);
  176. m_Level_Move = m_Level.FindAction("Move", throwIfNotFound: true);
  177. m_Level_Jump = m_Level.FindAction("Jump", throwIfNotFound: true);
  178. }
  179. public void Dispose()
  180. {
  181. UnityEngine.Object.Destroy(asset);
  182. }
  183. public InputBinding? bindingMask
  184. {
  185. get => asset.bindingMask;
  186. set => asset.bindingMask = value;
  187. }
  188. public ReadOnlyArray<InputDevice>? devices
  189. {
  190. get => asset.devices;
  191. set => asset.devices = value;
  192. }
  193. public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;
  194. public bool Contains(InputAction action)
  195. {
  196. return asset.Contains(action);
  197. }
  198. public IEnumerator<InputAction> GetEnumerator()
  199. {
  200. return asset.GetEnumerator();
  201. }
  202. IEnumerator IEnumerable.GetEnumerator()
  203. {
  204. return GetEnumerator();
  205. }
  206. public void Enable()
  207. {
  208. asset.Enable();
  209. }
  210. public void Disable()
  211. {
  212. asset.Disable();
  213. }
  214. // Level
  215. private readonly InputActionMap m_Level;
  216. private ILevelActions m_LevelActionsCallbackInterface;
  217. private readonly InputAction m_Level_Move;
  218. private readonly InputAction m_Level_Jump;
  219. public struct LevelActions
  220. {
  221. private @PlayerInput m_Wrapper;
  222. public LevelActions(@PlayerInput wrapper) { m_Wrapper = wrapper; }
  223. public InputAction @Move => m_Wrapper.m_Level_Move;
  224. public InputAction @Jump => m_Wrapper.m_Level_Jump;
  225. public InputActionMap Get() { return m_Wrapper.m_Level; }
  226. public void Enable() { Get().Enable(); }
  227. public void Disable() { Get().Disable(); }
  228. public bool enabled => Get().enabled;
  229. public static implicit operator InputActionMap(LevelActions set) { return set.Get(); }
  230. public void SetCallbacks(ILevelActions instance)
  231. {
  232. if (m_Wrapper.m_LevelActionsCallbackInterface != null)
  233. {
  234. @Move.started -= m_Wrapper.m_LevelActionsCallbackInterface.OnMove;
  235. @Move.performed -= m_Wrapper.m_LevelActionsCallbackInterface.OnMove;
  236. @Move.canceled -= m_Wrapper.m_LevelActionsCallbackInterface.OnMove;
  237. @Jump.started -= m_Wrapper.m_LevelActionsCallbackInterface.OnJump;
  238. @Jump.performed -= m_Wrapper.m_LevelActionsCallbackInterface.OnJump;
  239. @Jump.canceled -= m_Wrapper.m_LevelActionsCallbackInterface.OnJump;
  240. }
  241. m_Wrapper.m_LevelActionsCallbackInterface = instance;
  242. if (instance != null)
  243. {
  244. @Move.started += instance.OnMove;
  245. @Move.performed += instance.OnMove;
  246. @Move.canceled += instance.OnMove;
  247. @Jump.started += instance.OnJump;
  248. @Jump.performed += instance.OnJump;
  249. @Jump.canceled += instance.OnJump;
  250. }
  251. }
  252. }
  253. public LevelActions @Level => new LevelActions(this);
  254. public interface ILevelActions
  255. {
  256. void OnMove(InputAction.CallbackContext context);
  257. void OnJump(InputAction.CallbackContext context);
  258. }
  259. }