File size: 16,067 Bytes
18a519f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | //------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.4.3
// from Assets/Samples/DocsExamples/Actions/ExampleActions.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities;
public partial class @ExampleActions: IInputActionCollection2, IDisposable
{
public InputActionAsset asset { get; }
public @ExampleActions()
{
asset = InputActionAsset.FromJson(@"{
""name"": ""ExampleActions"",
""maps"": [
{
""name"": ""gameplay"",
""id"": ""d55be63c-61eb-47ef-92dd-eef1248d601e"",
""actions"": [
{
""name"": ""move"",
""type"": ""Value"",
""id"": ""8387a17d-aedd-4411-9931-6a855a8299fb"",
""expectedControlType"": ""Vector2"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": true
},
{
""name"": ""jump"",
""type"": ""Button"",
""id"": ""7fc1eb3c-b4d1-4aba-9a58-f36cac532d06"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""crouch"",
""type"": ""Button"",
""id"": ""851b3e53-f21f-4ba6-94fa-9f0b4db1ccb4"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""use"",
""type"": ""Button"",
""id"": ""b5f08480-c03b-4654-8475-9c94e8ccccaf"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": """",
""id"": ""2c541328-ed00-4524-817c-97599bac7de5"",
""path"": ""<Gamepad>{Player1}/leftStick"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""move"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": ""2D Vector"",
""id"": ""1bff55cb-bc9f-4a07-921b-c363f330e099"",
""path"": ""2DVector"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""move"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""a463e3bc-75b0-4b56-a790-05e2b7fd264c"",
""path"": ""<Keyboard>/upArrow"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""875ee5b9-f51e-4e41-bad6-930e14120008"",
""path"": ""<Keyboard>/downArrow"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""63c4eca5-962b-429e-8988-41dbdd085179"",
""path"": ""<Keyboard>/leftArrow"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""bfd5fbe5-e471-45c2-bcf9-905f21b37819"",
""path"": ""<Keyboard>/rightArrow"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": """",
""id"": ""c48db537-b211-412a-a86a-d31614bebb5d"",
""path"": ""<Gamepad>{Player1}/buttonSouth"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""jump"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""9a105e9c-c84a-4269-852a-29220b37c2a4"",
""path"": ""<Keyboard>/space"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""jump"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""636da59d-2ea1-4682-b67d-a40f48fa02a5"",
""path"": ""<Gamepad>{Player1}/buttonWest"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""crouch"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""69f2763d-08bc-4aac-9c35-f4f5f22e2928"",
""path"": ""<Keyboard>/z"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""crouch"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""41041dd1-570a-487c-856e-d58cfa06509a"",
""path"": ""<Gamepad>{Player1}/buttonNorth"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""use"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""4ac0be70-ea16-4ea3-98d4-0cf19fab4aec"",
""path"": ""<Keyboard>/x"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""use"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
},
{
""name"": ""menus"",
""id"": ""4d6bdb0c-7386-48fd-b39c-65304c2d209d"",
""actions"": [
{
""name"": ""New action"",
""type"": ""Button"",
""id"": ""e4dd2c60-a6d7-4ccd-8c2f-151ad3cf28a0"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": """",
""id"": ""3599143f-75d5-4647-8633-83410cf6d8f8"",
""path"": """",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""New action"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
}
],
""controlSchemes"": []
}");
// gameplay
m_gameplay = asset.FindActionMap("gameplay", throwIfNotFound: true);
m_gameplay_move = m_gameplay.FindAction("move", throwIfNotFound: true);
m_gameplay_jump = m_gameplay.FindAction("jump", throwIfNotFound: true);
m_gameplay_crouch = m_gameplay.FindAction("crouch", throwIfNotFound: true);
m_gameplay_use = m_gameplay.FindAction("use", throwIfNotFound: true);
// menus
m_menus = asset.FindActionMap("menus", throwIfNotFound: true);
m_menus_Newaction = m_menus.FindAction("New action", throwIfNotFound: true);
}
public void Dispose()
{
UnityEngine.Object.Destroy(asset);
}
public InputBinding? bindingMask
{
get => asset.bindingMask;
set => asset.bindingMask = value;
}
public ReadOnlyArray<InputDevice>? devices
{
get => asset.devices;
set => asset.devices = value;
}
public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;
public bool Contains(InputAction action)
{
return asset.Contains(action);
}
public IEnumerator<InputAction> GetEnumerator()
{
return asset.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public void Enable()
{
asset.Enable();
}
public void Disable()
{
asset.Disable();
}
public IEnumerable<InputBinding> bindings => asset.bindings;
public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false)
{
return asset.FindAction(actionNameOrId, throwIfNotFound);
}
public int FindBinding(InputBinding bindingMask, out InputAction action)
{
return asset.FindBinding(bindingMask, out action);
}
// gameplay
private readonly InputActionMap m_gameplay;
private IGameplayActions m_GameplayActionsCallbackInterface;
private readonly InputAction m_gameplay_move;
private readonly InputAction m_gameplay_jump;
private readonly InputAction m_gameplay_crouch;
private readonly InputAction m_gameplay_use;
public struct GameplayActions
{
private @ExampleActions m_Wrapper;
public GameplayActions(@ExampleActions wrapper) { m_Wrapper = wrapper; }
public InputAction @move => m_Wrapper.m_gameplay_move;
public InputAction @jump => m_Wrapper.m_gameplay_jump;
public InputAction @crouch => m_Wrapper.m_gameplay_crouch;
public InputAction @use => m_Wrapper.m_gameplay_use;
public InputActionMap Get() { return m_Wrapper.m_gameplay; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(GameplayActions set) { return set.Get(); }
public void SetCallbacks(IGameplayActions instance)
{
if (m_Wrapper.m_GameplayActionsCallbackInterface != null)
{
@move.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
@move.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
@move.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
@jump.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump;
@jump.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump;
@jump.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump;
@crouch.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnCrouch;
@crouch.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnCrouch;
@crouch.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnCrouch;
@use.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnUse;
@use.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnUse;
@use.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnUse;
}
m_Wrapper.m_GameplayActionsCallbackInterface = instance;
if (instance != null)
{
@move.started += instance.OnMove;
@move.performed += instance.OnMove;
@move.canceled += instance.OnMove;
@jump.started += instance.OnJump;
@jump.performed += instance.OnJump;
@jump.canceled += instance.OnJump;
@crouch.started += instance.OnCrouch;
@crouch.performed += instance.OnCrouch;
@crouch.canceled += instance.OnCrouch;
@use.started += instance.OnUse;
@use.performed += instance.OnUse;
@use.canceled += instance.OnUse;
}
}
}
public GameplayActions @gameplay => new GameplayActions(this);
// menus
private readonly InputActionMap m_menus;
private IMenusActions m_MenusActionsCallbackInterface;
private readonly InputAction m_menus_Newaction;
public struct MenusActions
{
private @ExampleActions m_Wrapper;
public MenusActions(@ExampleActions wrapper) { m_Wrapper = wrapper; }
public InputAction @Newaction => m_Wrapper.m_menus_Newaction;
public InputActionMap Get() { return m_Wrapper.m_menus; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(MenusActions set) { return set.Get(); }
public void SetCallbacks(IMenusActions instance)
{
if (m_Wrapper.m_MenusActionsCallbackInterface != null)
{
@Newaction.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnNewaction;
@Newaction.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnNewaction;
@Newaction.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnNewaction;
}
m_Wrapper.m_MenusActionsCallbackInterface = instance;
if (instance != null)
{
@Newaction.started += instance.OnNewaction;
@Newaction.performed += instance.OnNewaction;
@Newaction.canceled += instance.OnNewaction;
}
}
}
public MenusActions @menus => new MenusActions(this);
public interface IGameplayActions
{
void OnMove(InputAction.CallbackContext context);
void OnJump(InputAction.CallbackContext context);
void OnCrouch(InputAction.CallbackContext context);
void OnUse(InputAction.CallbackContext context);
}
public interface IMenusActions
{
void OnNewaction(InputAction.CallbackContext context);
}
}
|