@@ -53,6 +53,15 @@ public @PlayerInputActions()
53
53
""processors"": """",
54
54
""interactions"": """",
55
55
""initialStateCheck"": false
56
+ },
57
+ {
58
+ ""name"": ""Pause"",
59
+ ""type"": ""Button"",
60
+ ""id"": ""72a3400b-8f1f-407c-88a9-a2d1c0cb7e1b"",
61
+ ""expectedControlType"": ""Button"",
62
+ ""processors"": """",
63
+ ""interactions"": """",
64
+ ""initialStateCheck"": false
56
65
}
57
66
],
58
67
""bindings"": [
@@ -253,6 +262,28 @@ public @PlayerInputActions()
253
262
""action"": ""LookAround"",
254
263
""isComposite"": false,
255
264
""isPartOfComposite"": true
265
+ },
266
+ {
267
+ ""name"": """",
268
+ ""id"": ""0bdf96af-90a7-4005-8fd6-35f4417f8fcd"",
269
+ ""path"": ""<Keyboard>/p"",
270
+ ""interactions"": """",
271
+ ""processors"": """",
272
+ ""groups"": ""KeyboardMouse"",
273
+ ""action"": ""Pause"",
274
+ ""isComposite"": false,
275
+ ""isPartOfComposite"": false
276
+ },
277
+ {
278
+ ""name"": """",
279
+ ""id"": ""dc1dd3c9-e01a-45c6-bd59-2ecf583701b0"",
280
+ ""path"": ""<Gamepad>/start"",
281
+ ""interactions"": """",
282
+ ""processors"": """",
283
+ ""groups"": ""Gamepad"",
284
+ ""action"": ""Pause"",
285
+ ""isComposite"": false,
286
+ ""isPartOfComposite"": false
256
287
}
257
288
]
258
289
}
@@ -292,6 +323,7 @@ public @PlayerInputActions()
292
323
m_Player_Move = m_Player . FindAction ( "Move" , throwIfNotFound : true ) ;
293
324
m_Player_LookAround = m_Player . FindAction ( "LookAround" , throwIfNotFound : true ) ;
294
325
m_Player_Run = m_Player . FindAction ( "Run" , throwIfNotFound : true ) ;
326
+ m_Player_Pause = m_Player . FindAction ( "Pause" , throwIfNotFound : true ) ;
295
327
}
296
328
297
329
public void Dispose ( )
@@ -354,13 +386,15 @@ public int FindBinding(InputBinding bindingMask, out InputAction action)
354
386
private readonly InputAction m_Player_Move ;
355
387
private readonly InputAction m_Player_LookAround ;
356
388
private readonly InputAction m_Player_Run ;
389
+ private readonly InputAction m_Player_Pause ;
357
390
public struct PlayerActions
358
391
{
359
392
private @PlayerInputActions m_Wrapper ;
360
393
public PlayerActions ( @PlayerInputActions wrapper ) { m_Wrapper = wrapper ; }
361
394
public InputAction @Move => m_Wrapper . m_Player_Move ;
362
395
public InputAction @LookAround => m_Wrapper . m_Player_LookAround ;
363
396
public InputAction @Run => m_Wrapper . m_Player_Run ;
397
+ public InputAction @Pause => m_Wrapper . m_Player_Pause ;
364
398
public InputActionMap Get ( ) { return m_Wrapper . m_Player ; }
365
399
public void Enable ( ) { Get ( ) . Enable ( ) ; }
366
400
public void Disable ( ) { Get ( ) . Disable ( ) ; }
@@ -379,6 +413,9 @@ public void SetCallbacks(IPlayerActions instance)
379
413
@Run . started -= m_Wrapper . m_PlayerActionsCallbackInterface . OnRun ;
380
414
@Run . performed -= m_Wrapper . m_PlayerActionsCallbackInterface . OnRun ;
381
415
@Run . canceled -= m_Wrapper . m_PlayerActionsCallbackInterface . OnRun ;
416
+ @Pause . started -= m_Wrapper . m_PlayerActionsCallbackInterface . OnPause ;
417
+ @Pause . performed -= m_Wrapper . m_PlayerActionsCallbackInterface . OnPause ;
418
+ @Pause . canceled -= m_Wrapper . m_PlayerActionsCallbackInterface . OnPause ;
382
419
}
383
420
m_Wrapper . m_PlayerActionsCallbackInterface = instance ;
384
421
if ( instance != null )
@@ -392,6 +429,9 @@ public void SetCallbacks(IPlayerActions instance)
392
429
@Run . started += instance . OnRun ;
393
430
@Run . performed += instance . OnRun ;
394
431
@Run . canceled += instance . OnRun ;
432
+ @Pause . started += instance . OnPause ;
433
+ @Pause . performed += instance . OnPause ;
434
+ @Pause . canceled += instance . OnPause ;
395
435
}
396
436
}
397
437
}
@@ -419,5 +459,6 @@ public interface IPlayerActions
419
459
void OnMove ( InputAction . CallbackContext context ) ;
420
460
void OnLookAround ( InputAction . CallbackContext context ) ;
421
461
void OnRun ( InputAction . CallbackContext context ) ;
462
+ void OnPause ( InputAction . CallbackContext context ) ;
422
463
}
423
464
}
0 commit comments