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.

282 lines
10 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. ""name"": """",
  171. ""id"": ""9ccfba17-299b-47dc-b571-4acf9801cb5e"",
  172. ""path"": ""<Keyboard>/upArrow"",
  173. ""interactions"": """",
  174. ""processors"": """",
  175. ""groups"": """",
  176. ""action"": ""Jump"",
  177. ""isComposite"": false,
  178. ""isPartOfComposite"": false
  179. }
  180. ]
  181. }
  182. ],
  183. ""controlSchemes"": []
  184. }");
  185. // Level
  186. m_Level = asset.FindActionMap("Level", throwIfNotFound: true);
  187. m_Level_Move = m_Level.FindAction("Move", throwIfNotFound: true);
  188. m_Level_Jump = m_Level.FindAction("Jump", throwIfNotFound: true);
  189. }
  190. public void Dispose()
  191. {
  192. UnityEngine.Object.Destroy(asset);
  193. }
  194. public InputBinding? bindingMask
  195. {
  196. get => asset.bindingMask;
  197. set => asset.bindingMask = value;
  198. }
  199. public ReadOnlyArray<InputDevice>? devices
  200. {
  201. get => asset.devices;
  202. set => asset.devices = value;
  203. }
  204. public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;
  205. public bool Contains(InputAction action)
  206. {
  207. return asset.Contains(action);
  208. }
  209. public IEnumerator<InputAction> GetEnumerator()
  210. {
  211. return asset.GetEnumerator();
  212. }
  213. IEnumerator IEnumerable.GetEnumerator()
  214. {
  215. return GetEnumerator();
  216. }
  217. public void Enable()
  218. {
  219. asset.Enable();
  220. }
  221. public void Disable()
  222. {
  223. asset.Disable();
  224. }
  225. // Level
  226. private readonly InputActionMap m_Level;
  227. private ILevelActions m_LevelActionsCallbackInterface;
  228. private readonly InputAction m_Level_Move;
  229. private readonly InputAction m_Level_Jump;
  230. public struct LevelActions
  231. {
  232. private @PlayerInput m_Wrapper;
  233. public LevelActions(@PlayerInput wrapper) { m_Wrapper = wrapper; }
  234. public InputAction @Move => m_Wrapper.m_Level_Move;
  235. public InputAction @Jump => m_Wrapper.m_Level_Jump;
  236. public InputActionMap Get() { return m_Wrapper.m_Level; }
  237. public void Enable() { Get().Enable(); }
  238. public void Disable() { Get().Disable(); }
  239. public bool enabled => Get().enabled;
  240. public static implicit operator InputActionMap(LevelActions set) { return set.Get(); }
  241. public void SetCallbacks(ILevelActions instance)
  242. {
  243. if (m_Wrapper.m_LevelActionsCallbackInterface != null)
  244. {
  245. @Move.started -= m_Wrapper.m_LevelActionsCallbackInterface.OnMove;
  246. @Move.performed -= m_Wrapper.m_LevelActionsCallbackInterface.OnMove;
  247. @Move.canceled -= m_Wrapper.m_LevelActionsCallbackInterface.OnMove;
  248. @Jump.started -= m_Wrapper.m_LevelActionsCallbackInterface.OnJump;
  249. @Jump.performed -= m_Wrapper.m_LevelActionsCallbackInterface.OnJump;
  250. @Jump.canceled -= m_Wrapper.m_LevelActionsCallbackInterface.OnJump;
  251. }
  252. m_Wrapper.m_LevelActionsCallbackInterface = instance;
  253. if (instance != null)
  254. {
  255. @Move.started += instance.OnMove;
  256. @Move.performed += instance.OnMove;
  257. @Move.canceled += instance.OnMove;
  258. @Jump.started += instance.OnJump;
  259. @Jump.performed += instance.OnJump;
  260. @Jump.canceled += instance.OnJump;
  261. }
  262. }
  263. }
  264. public LevelActions @Level => new LevelActions(this);
  265. public interface ILevelActions
  266. {
  267. void OnMove(InputAction.CallbackContext context);
  268. void OnJump(InputAction.CallbackContext context);
  269. }
  270. }