SlimeControls.cs (22709B)
1 // GENERATED AUTOMATICALLY FROM 'Assets/Scripts/Slimecing/InputSystem/SlimeControls.inputactions' 2 3 using System; 4 using System.Collections; 5 using System.Collections.Generic; 6 using UnityEngine.InputSystem; 7 using UnityEngine.InputSystem.Utilities; 8 9 namespace Slimecing.InputSystem 10 { 11 public class @SlimeControls : IInputActionCollection, IDisposable 12 { 13 public InputActionAsset asset { get; } 14 public @SlimeControls() 15 { 16 asset = InputActionAsset.FromJson(@"{ 17 ""name"": ""SlimeControls"", 18 ""maps"": [ 19 { 20 ""name"": ""VsGameplay"", 21 ""id"": ""a0766e30-e847-4bfe-b5bc-cde1c9883be5"", 22 ""actions"": [ 23 { 24 ""name"": ""Horizontal"", 25 ""type"": ""Button"", 26 ""id"": ""8abfc885-0de5-41b1-8abb-45b2ff94793e"", 27 ""expectedControlType"": """", 28 ""processors"": """", 29 ""interactions"": """" 30 }, 31 { 32 ""name"": ""Vertical"", 33 ""type"": ""Button"", 34 ""id"": ""795a2a8f-8cdf-4247-8e61-45697d87c257"", 35 ""expectedControlType"": """", 36 ""processors"": """", 37 ""interactions"": """" 38 } 39 ], 40 ""bindings"": [ 41 { 42 ""name"": ""1D Axis"", 43 ""id"": ""24e32e59-8146-430e-84f2-a1b70931ae4d"", 44 ""path"": ""1DAxis"", 45 ""interactions"": """", 46 ""processors"": """", 47 ""groups"": """", 48 ""action"": ""Horizontal"", 49 ""isComposite"": true, 50 ""isPartOfComposite"": false 51 }, 52 { 53 ""name"": ""negative"", 54 ""id"": ""704f98c2-def6-4d1f-919a-f55afc789a69"", 55 ""path"": ""<Gamepad>/leftStick/left"", 56 ""interactions"": """", 57 ""processors"": """", 58 ""groups"": ""Gamepad"", 59 ""action"": ""Horizontal"", 60 ""isComposite"": false, 61 ""isPartOfComposite"": true 62 }, 63 { 64 ""name"": ""positive"", 65 ""id"": ""7930672c-a277-4b7d-abd4-36e6dc8a2f60"", 66 ""path"": ""<Gamepad>/leftStick/right"", 67 ""interactions"": """", 68 ""processors"": """", 69 ""groups"": ""Gamepad"", 70 ""action"": ""Horizontal"", 71 ""isComposite"": false, 72 ""isPartOfComposite"": true 73 }, 74 { 75 ""name"": ""1D Axis"", 76 ""id"": ""1795ec87-9b67-4d39-9dc3-1340cb616993"", 77 ""path"": ""1DAxis"", 78 ""interactions"": """", 79 ""processors"": """", 80 ""groups"": """", 81 ""action"": ""Vertical"", 82 ""isComposite"": true, 83 ""isPartOfComposite"": false 84 }, 85 { 86 ""name"": ""negative"", 87 ""id"": ""0935a6f8-0eef-416b-a799-3bd4bf1a7427"", 88 ""path"": ""<Gamepad>/leftStick/down"", 89 ""interactions"": """", 90 ""processors"": """", 91 ""groups"": ""Gamepad"", 92 ""action"": ""Vertical"", 93 ""isComposite"": false, 94 ""isPartOfComposite"": true 95 }, 96 { 97 ""name"": ""positive"", 98 ""id"": ""5b09c630-5af5-43d1-9aa5-53f006f852db"", 99 ""path"": ""<Gamepad>/leftStick/up"", 100 ""interactions"": """", 101 ""processors"": """", 102 ""groups"": ""Gamepad"", 103 ""action"": ""Vertical"", 104 ""isComposite"": false, 105 ""isPartOfComposite"": true 106 }, 107 { 108 ""name"": ""1D Axis"", 109 ""id"": ""81786b8d-0478-4026-822f-27bbb95d6069"", 110 ""path"": ""1DAxis"", 111 ""interactions"": """", 112 ""processors"": """", 113 ""groups"": """", 114 ""action"": ""Horizontal"", 115 ""isComposite"": true, 116 ""isPartOfComposite"": false 117 }, 118 { 119 ""name"": ""negative"", 120 ""id"": ""c7c2af17-1134-4d80-894b-b672947e3154"", 121 ""path"": ""<Keyboard>/a"", 122 ""interactions"": """", 123 ""processors"": """", 124 ""groups"": ""Keyboard & Mouse"", 125 ""action"": ""Horizontal"", 126 ""isComposite"": false, 127 ""isPartOfComposite"": true 128 }, 129 { 130 ""name"": ""positive"", 131 ""id"": ""45d948f8-6196-4d84-b6d2-910feb90be8d"", 132 ""path"": ""<Keyboard>/d"", 133 ""interactions"": """", 134 ""processors"": """", 135 ""groups"": ""Keyboard & Mouse"", 136 ""action"": ""Horizontal"", 137 ""isComposite"": false, 138 ""isPartOfComposite"": true 139 }, 140 { 141 ""name"": ""1D Axis"", 142 ""id"": ""f63e4496-f181-4d11-b089-95ea60655e50"", 143 ""path"": ""1DAxis"", 144 ""interactions"": """", 145 ""processors"": """", 146 ""groups"": """", 147 ""action"": ""Vertical"", 148 ""isComposite"": true, 149 ""isPartOfComposite"": false 150 }, 151 { 152 ""name"": ""negative"", 153 ""id"": ""043fe824-d52a-42b9-82c3-12aec1a16dd5"", 154 ""path"": ""<Keyboard>/s"", 155 ""interactions"": """", 156 ""processors"": """", 157 ""groups"": ""Keyboard & Mouse"", 158 ""action"": ""Vertical"", 159 ""isComposite"": false, 160 ""isPartOfComposite"": true 161 }, 162 { 163 ""name"": ""positive"", 164 ""id"": ""7898eedc-f9ff-4760-b4f4-e701c57d1998"", 165 ""path"": ""<Keyboard>/w"", 166 ""interactions"": """", 167 ""processors"": """", 168 ""groups"": ""Keyboard & Mouse"", 169 ""action"": ""Vertical"", 170 ""isComposite"": false, 171 ""isPartOfComposite"": true 172 } 173 ] 174 }, 175 { 176 ""name"": ""AbilityButtons"", 177 ""id"": ""d85b4990-0594-4026-95e2-1724c2874fd5"", 178 ""actions"": [ 179 { 180 ""name"": ""DashAbility"", 181 ""type"": ""Button"", 182 ""id"": ""355e076c-fecd-4a86-980c-3e1360ebc1bc"", 183 ""expectedControlType"": """", 184 ""processors"": """", 185 ""interactions"": """" 186 }, 187 { 188 ""name"": ""JumpAbility"", 189 ""type"": ""Button"", 190 ""id"": ""4769900b-900e-4e04-8ca7-4cd6537ca9d8"", 191 ""expectedControlType"": """", 192 ""processors"": """", 193 ""interactions"": """" 194 } 195 ], 196 ""bindings"": [ 197 { 198 ""name"": """", 199 ""id"": ""45fb3c07-00a4-4e33-8fce-247e7a176e69"", 200 ""path"": ""<Keyboard>/leftShift"", 201 ""interactions"": """", 202 ""processors"": """", 203 ""groups"": ""Keyboard & Mouse"", 204 ""action"": ""DashAbility"", 205 ""isComposite"": false, 206 ""isPartOfComposite"": false 207 }, 208 { 209 ""name"": """", 210 ""id"": ""64d92f1e-5e22-44a1-a81e-43c57ff6bd1c"", 211 ""path"": ""<Gamepad>/leftShoulder"", 212 ""interactions"": """", 213 ""processors"": """", 214 ""groups"": ""Gamepad"", 215 ""action"": ""DashAbility"", 216 ""isComposite"": false, 217 ""isPartOfComposite"": false 218 }, 219 { 220 ""name"": """", 221 ""id"": ""4f4585e7-329f-4e05-be72-04adbaff785a"", 222 ""path"": ""<Keyboard>/space"", 223 ""interactions"": ""hold(duration=0.2)"", 224 ""processors"": """", 225 ""groups"": ""Keyboard & Mouse"", 226 ""action"": ""JumpAbility"", 227 ""isComposite"": false, 228 ""isPartOfComposite"": false 229 }, 230 { 231 ""name"": """", 232 ""id"": ""64f8c14b-8e49-42aa-ab74-cfe2ba394090"", 233 ""path"": ""<Gamepad>/buttonSouth"", 234 ""interactions"": ""hold(duration=0.2)"", 235 ""processors"": """", 236 ""groups"": ""Gamepad"", 237 ""action"": ""JumpAbility"", 238 ""isComposite"": false, 239 ""isPartOfComposite"": false 240 } 241 ] 242 }, 243 { 244 ""name"": ""SwordButtons"", 245 ""id"": ""10c118b0-623f-4675-b54b-081f6f92f058"", 246 ""actions"": [ 247 { 248 ""name"": ""SwordMovement"", 249 ""type"": ""Value"", 250 ""id"": ""62a768e6-9912-4927-b552-bb7cd666df7c"", 251 ""expectedControlType"": ""Vector2"", 252 ""processors"": """", 253 ""interactions"": """" 254 } 255 ], 256 ""bindings"": [ 257 { 258 ""name"": """", 259 ""id"": ""ca69d397-54f1-4ea7-a580-7773a6e6f0a6"", 260 ""path"": ""<Gamepad>/rightStick"", 261 ""interactions"": """", 262 ""processors"": ""StickDeadzone"", 263 ""groups"": ""Gamepad"", 264 ""action"": ""SwordMovement"", 265 ""isComposite"": false, 266 ""isPartOfComposite"": false 267 }, 268 { 269 ""name"": """", 270 ""id"": ""1e69138a-f920-40c8-a4bc-4ff87648ceab"", 271 ""path"": ""<Mouse>/position"", 272 ""interactions"": """", 273 ""processors"": """", 274 ""groups"": ""Keyboard & Mouse"", 275 ""action"": ""SwordMovement"", 276 ""isComposite"": false, 277 ""isPartOfComposite"": false 278 } 279 ] 280 } 281 ], 282 ""controlSchemes"": [ 283 { 284 ""name"": ""All Control Schemes"", 285 ""bindingGroup"": ""All Control Schemes"", 286 ""devices"": [] 287 }, 288 { 289 ""name"": ""Gamepad"", 290 ""bindingGroup"": ""Gamepad"", 291 ""devices"": [ 292 { 293 ""devicePath"": ""<Gamepad>"", 294 ""isOptional"": false, 295 ""isOR"": false 296 } 297 ] 298 }, 299 { 300 ""name"": ""Keyboard & Mouse"", 301 ""bindingGroup"": ""Keyboard & Mouse"", 302 ""devices"": [ 303 { 304 ""devicePath"": ""<Keyboard>"", 305 ""isOptional"": false, 306 ""isOR"": false 307 }, 308 { 309 ""devicePath"": ""<Mouse>"", 310 ""isOptional"": false, 311 ""isOR"": false 312 } 313 ] 314 } 315 ] 316 }"); 317 // VsGameplay 318 m_VsGameplay = asset.FindActionMap("VsGameplay", throwIfNotFound: true); 319 m_VsGameplay_Horizontal = m_VsGameplay.FindAction("Horizontal", throwIfNotFound: true); 320 m_VsGameplay_Vertical = m_VsGameplay.FindAction("Vertical", throwIfNotFound: true); 321 // AbilityButtons 322 m_AbilityButtons = asset.FindActionMap("AbilityButtons", throwIfNotFound: true); 323 m_AbilityButtons_DashAbility = m_AbilityButtons.FindAction("DashAbility", throwIfNotFound: true); 324 m_AbilityButtons_JumpAbility = m_AbilityButtons.FindAction("JumpAbility", throwIfNotFound: true); 325 // SwordButtons 326 m_SwordButtons = asset.FindActionMap("SwordButtons", throwIfNotFound: true); 327 m_SwordButtons_SwordMovement = m_SwordButtons.FindAction("SwordMovement", throwIfNotFound: true); 328 } 329 330 public void Dispose() 331 { 332 UnityEngine.Object.Destroy(asset); 333 } 334 335 public InputBinding? bindingMask 336 { 337 get => asset.bindingMask; 338 set => asset.bindingMask = value; 339 } 340 341 public ReadOnlyArray<InputDevice>? devices 342 { 343 get => asset.devices; 344 set => asset.devices = value; 345 } 346 347 public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes; 348 349 public bool Contains(InputAction action) 350 { 351 return asset.Contains(action); 352 } 353 354 public IEnumerator<InputAction> GetEnumerator() 355 { 356 return asset.GetEnumerator(); 357 } 358 359 IEnumerator IEnumerable.GetEnumerator() 360 { 361 return GetEnumerator(); 362 } 363 364 public void Enable() 365 { 366 asset.Enable(); 367 } 368 369 public void Disable() 370 { 371 asset.Disable(); 372 } 373 374 // VsGameplay 375 private readonly InputActionMap m_VsGameplay; 376 private IVsGameplayActions m_VsGameplayActionsCallbackInterface; 377 private readonly InputAction m_VsGameplay_Horizontal; 378 private readonly InputAction m_VsGameplay_Vertical; 379 public struct VsGameplayActions 380 { 381 private @SlimeControls m_Wrapper; 382 public VsGameplayActions(@SlimeControls wrapper) { m_Wrapper = wrapper; } 383 public InputAction @Horizontal => m_Wrapper.m_VsGameplay_Horizontal; 384 public InputAction @Vertical => m_Wrapper.m_VsGameplay_Vertical; 385 public InputActionMap Get() { return m_Wrapper.m_VsGameplay; } 386 public void Enable() { Get().Enable(); } 387 public void Disable() { Get().Disable(); } 388 public bool enabled => Get().enabled; 389 public static implicit operator InputActionMap(VsGameplayActions set) { return set.Get(); } 390 public void SetCallbacks(IVsGameplayActions instance) 391 { 392 if (m_Wrapper.m_VsGameplayActionsCallbackInterface != null) 393 { 394 @Horizontal.started -= m_Wrapper.m_VsGameplayActionsCallbackInterface.OnHorizontal; 395 @Horizontal.performed -= m_Wrapper.m_VsGameplayActionsCallbackInterface.OnHorizontal; 396 @Horizontal.canceled -= m_Wrapper.m_VsGameplayActionsCallbackInterface.OnHorizontal; 397 @Vertical.started -= m_Wrapper.m_VsGameplayActionsCallbackInterface.OnVertical; 398 @Vertical.performed -= m_Wrapper.m_VsGameplayActionsCallbackInterface.OnVertical; 399 @Vertical.canceled -= m_Wrapper.m_VsGameplayActionsCallbackInterface.OnVertical; 400 } 401 m_Wrapper.m_VsGameplayActionsCallbackInterface = instance; 402 if (instance != null) 403 { 404 @Horizontal.started += instance.OnHorizontal; 405 @Horizontal.performed += instance.OnHorizontal; 406 @Horizontal.canceled += instance.OnHorizontal; 407 @Vertical.started += instance.OnVertical; 408 @Vertical.performed += instance.OnVertical; 409 @Vertical.canceled += instance.OnVertical; 410 } 411 } 412 } 413 public VsGameplayActions @VsGameplay => new VsGameplayActions(this); 414 415 // AbilityButtons 416 private readonly InputActionMap m_AbilityButtons; 417 private IAbilityButtonsActions m_AbilityButtonsActionsCallbackInterface; 418 private readonly InputAction m_AbilityButtons_DashAbility; 419 private readonly InputAction m_AbilityButtons_JumpAbility; 420 public struct AbilityButtonsActions 421 { 422 private @SlimeControls m_Wrapper; 423 public AbilityButtonsActions(@SlimeControls wrapper) { m_Wrapper = wrapper; } 424 public InputAction @DashAbility => m_Wrapper.m_AbilityButtons_DashAbility; 425 public InputAction @JumpAbility => m_Wrapper.m_AbilityButtons_JumpAbility; 426 public InputActionMap Get() { return m_Wrapper.m_AbilityButtons; } 427 public void Enable() { Get().Enable(); } 428 public void Disable() { Get().Disable(); } 429 public bool enabled => Get().enabled; 430 public static implicit operator InputActionMap(AbilityButtonsActions set) { return set.Get(); } 431 public void SetCallbacks(IAbilityButtonsActions instance) 432 { 433 if (m_Wrapper.m_AbilityButtonsActionsCallbackInterface != null) 434 { 435 @DashAbility.started -= m_Wrapper.m_AbilityButtonsActionsCallbackInterface.OnDashAbility; 436 @DashAbility.performed -= m_Wrapper.m_AbilityButtonsActionsCallbackInterface.OnDashAbility; 437 @DashAbility.canceled -= m_Wrapper.m_AbilityButtonsActionsCallbackInterface.OnDashAbility; 438 @JumpAbility.started -= m_Wrapper.m_AbilityButtonsActionsCallbackInterface.OnJumpAbility; 439 @JumpAbility.performed -= m_Wrapper.m_AbilityButtonsActionsCallbackInterface.OnJumpAbility; 440 @JumpAbility.canceled -= m_Wrapper.m_AbilityButtonsActionsCallbackInterface.OnJumpAbility; 441 } 442 m_Wrapper.m_AbilityButtonsActionsCallbackInterface = instance; 443 if (instance != null) 444 { 445 @DashAbility.started += instance.OnDashAbility; 446 @DashAbility.performed += instance.OnDashAbility; 447 @DashAbility.canceled += instance.OnDashAbility; 448 @JumpAbility.started += instance.OnJumpAbility; 449 @JumpAbility.performed += instance.OnJumpAbility; 450 @JumpAbility.canceled += instance.OnJumpAbility; 451 } 452 } 453 } 454 public AbilityButtonsActions @AbilityButtons => new AbilityButtonsActions(this); 455 456 // SwordButtons 457 private readonly InputActionMap m_SwordButtons; 458 private ISwordButtonsActions m_SwordButtonsActionsCallbackInterface; 459 private readonly InputAction m_SwordButtons_SwordMovement; 460 public struct SwordButtonsActions 461 { 462 private @SlimeControls m_Wrapper; 463 public SwordButtonsActions(@SlimeControls wrapper) { m_Wrapper = wrapper; } 464 public InputAction @SwordMovement => m_Wrapper.m_SwordButtons_SwordMovement; 465 public InputActionMap Get() { return m_Wrapper.m_SwordButtons; } 466 public void Enable() { Get().Enable(); } 467 public void Disable() { Get().Disable(); } 468 public bool enabled => Get().enabled; 469 public static implicit operator InputActionMap(SwordButtonsActions set) { return set.Get(); } 470 public void SetCallbacks(ISwordButtonsActions instance) 471 { 472 if (m_Wrapper.m_SwordButtonsActionsCallbackInterface != null) 473 { 474 @SwordMovement.started -= m_Wrapper.m_SwordButtonsActionsCallbackInterface.OnSwordMovement; 475 @SwordMovement.performed -= m_Wrapper.m_SwordButtonsActionsCallbackInterface.OnSwordMovement; 476 @SwordMovement.canceled -= m_Wrapper.m_SwordButtonsActionsCallbackInterface.OnSwordMovement; 477 } 478 m_Wrapper.m_SwordButtonsActionsCallbackInterface = instance; 479 if (instance != null) 480 { 481 @SwordMovement.started += instance.OnSwordMovement; 482 @SwordMovement.performed += instance.OnSwordMovement; 483 @SwordMovement.canceled += instance.OnSwordMovement; 484 } 485 } 486 } 487 public SwordButtonsActions @SwordButtons => new SwordButtonsActions(this); 488 private int m_AllControlSchemesSchemeIndex = -1; 489 public InputControlScheme AllControlSchemesScheme 490 { 491 get 492 { 493 if (m_AllControlSchemesSchemeIndex == -1) m_AllControlSchemesSchemeIndex = asset.FindControlSchemeIndex("All Control Schemes"); 494 return asset.controlSchemes[m_AllControlSchemesSchemeIndex]; 495 } 496 } 497 private int m_GamepadSchemeIndex = -1; 498 public InputControlScheme GamepadScheme 499 { 500 get 501 { 502 if (m_GamepadSchemeIndex == -1) m_GamepadSchemeIndex = asset.FindControlSchemeIndex("Gamepad"); 503 return asset.controlSchemes[m_GamepadSchemeIndex]; 504 } 505 } 506 private int m_KeyboardMouseSchemeIndex = -1; 507 public InputControlScheme KeyboardMouseScheme 508 { 509 get 510 { 511 if (m_KeyboardMouseSchemeIndex == -1) m_KeyboardMouseSchemeIndex = asset.FindControlSchemeIndex("Keyboard & Mouse"); 512 return asset.controlSchemes[m_KeyboardMouseSchemeIndex]; 513 } 514 } 515 public interface IVsGameplayActions 516 { 517 void OnHorizontal(InputAction.CallbackContext context); 518 void OnVertical(InputAction.CallbackContext context); 519 } 520 public interface IAbilityButtonsActions 521 { 522 void OnDashAbility(InputAction.CallbackContext context); 523 void OnJumpAbility(InputAction.CallbackContext context); 524 } 525 public interface ISwordButtonsActions 526 { 527 void OnSwordMovement(InputAction.CallbackContext context); 528 } 529 } 530 }