Skip to content

Commit 83a323b

Browse files
committed
Zoom and selection works. No comments yet
1 parent 15d5651 commit 83a323b

File tree

8 files changed

+5272
-3
lines changed

8 files changed

+5272
-3
lines changed

Assets/_Project/Input/TallyInputSystem.cs

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,38 @@ public @TallyInputSystem()
288288
""expectedControlType"": ""Axis"",
289289
""processors"": """",
290290
""interactions"": """"
291+
},
292+
{
293+
""name"": ""SelectLeft"",
294+
""type"": ""Button"",
295+
""id"": ""642eb606-4a97-4d33-b73b-45620453c96d"",
296+
""expectedControlType"": ""Button"",
297+
""processors"": """",
298+
""interactions"": """"
299+
},
300+
{
301+
""name"": ""SelectRight"",
302+
""type"": ""Button"",
303+
""id"": ""96718a59-70f6-4072-8c60-62f078ce7280"",
304+
""expectedControlType"": ""Button"",
305+
""processors"": """",
306+
""interactions"": """"
307+
},
308+
{
309+
""name"": ""ZoomIn"",
310+
""type"": ""Button"",
311+
""id"": ""674cc3c2-ee52-4af9-8da6-f4ffe4b0a7ae"",
312+
""expectedControlType"": ""Button"",
313+
""processors"": """",
314+
""interactions"": """"
315+
},
316+
{
317+
""name"": ""ZoomOut"",
318+
""type"": ""Button"",
319+
""id"": ""5d09888a-b4c6-4dfa-8230-8ed03b2b451f"",
320+
""expectedControlType"": ""Button"",
321+
""processors"": """",
322+
""interactions"": """"
291323
}
292324
],
293325
""bindings"": [
@@ -312,6 +344,50 @@ public @TallyInputSystem()
312344
""action"": ""VerticalMovement"",
313345
""isComposite"": false,
314346
""isPartOfComposite"": false
347+
},
348+
{
349+
""name"": """",
350+
""id"": ""91bc4016-3b05-4f64-991d-f468db222b53"",
351+
""path"": ""<Keyboard>/leftArrow"",
352+
""interactions"": """",
353+
""processors"": """",
354+
""groups"": """",
355+
""action"": ""SelectLeft"",
356+
""isComposite"": false,
357+
""isPartOfComposite"": false
358+
},
359+
{
360+
""name"": """",
361+
""id"": ""8243ac7f-1b18-40ac-ad62-7c65a80554c0"",
362+
""path"": ""<Keyboard>/rightArrow"",
363+
""interactions"": """",
364+
""processors"": """",
365+
""groups"": """",
366+
""action"": ""SelectRight"",
367+
""isComposite"": false,
368+
""isPartOfComposite"": false
369+
},
370+
{
371+
""name"": """",
372+
""id"": ""ffa8e996-cbf6-4c29-8047-ab5ea597c2fc"",
373+
""path"": ""<Keyboard>/upArrow"",
374+
""interactions"": """",
375+
""processors"": """",
376+
""groups"": """",
377+
""action"": ""ZoomIn"",
378+
""isComposite"": false,
379+
""isPartOfComposite"": false
380+
},
381+
{
382+
""name"": """",
383+
""id"": ""53133cea-56df-4dfd-bead-1725b0d50780"",
384+
""path"": ""<Keyboard>/downArrow"",
385+
""interactions"": """",
386+
""processors"": """",
387+
""groups"": """",
388+
""action"": ""ZoomOut"",
389+
""isComposite"": false,
390+
""isPartOfComposite"": false
315391
}
316392
]
317393
}
@@ -338,6 +414,10 @@ public @TallyInputSystem()
338414
m_Player = asset.FindActionMap("Player", throwIfNotFound: true);
339415
m_Player_HorizontalMovement = m_Player.FindAction("HorizontalMovement", throwIfNotFound: true);
340416
m_Player_VerticalMovement = m_Player.FindAction("VerticalMovement", throwIfNotFound: true);
417+
m_Player_SelectLeft = m_Player.FindAction("SelectLeft", throwIfNotFound: true);
418+
m_Player_SelectRight = m_Player.FindAction("SelectRight", throwIfNotFound: true);
419+
m_Player_ZoomIn = m_Player.FindAction("ZoomIn", throwIfNotFound: true);
420+
m_Player_ZoomOut = m_Player.FindAction("ZoomOut", throwIfNotFound: true);
341421
}
342422

343423
public void Dispose()
@@ -535,12 +615,20 @@ public void SetCallbacks(IUIActions instance)
535615
private IPlayerActions m_PlayerActionsCallbackInterface;
536616
private readonly InputAction m_Player_HorizontalMovement;
537617
private readonly InputAction m_Player_VerticalMovement;
618+
private readonly InputAction m_Player_SelectLeft;
619+
private readonly InputAction m_Player_SelectRight;
620+
private readonly InputAction m_Player_ZoomIn;
621+
private readonly InputAction m_Player_ZoomOut;
538622
public struct PlayerActions
539623
{
540624
private @TallyInputSystem m_Wrapper;
541625
public PlayerActions(@TallyInputSystem wrapper) { m_Wrapper = wrapper; }
542626
public InputAction @HorizontalMovement => m_Wrapper.m_Player_HorizontalMovement;
543627
public InputAction @VerticalMovement => m_Wrapper.m_Player_VerticalMovement;
628+
public InputAction @SelectLeft => m_Wrapper.m_Player_SelectLeft;
629+
public InputAction @SelectRight => m_Wrapper.m_Player_SelectRight;
630+
public InputAction @ZoomIn => m_Wrapper.m_Player_ZoomIn;
631+
public InputAction @ZoomOut => m_Wrapper.m_Player_ZoomOut;
544632
public InputActionMap Get() { return m_Wrapper.m_Player; }
545633
public void Enable() { Get().Enable(); }
546634
public void Disable() { Get().Disable(); }
@@ -556,6 +644,18 @@ public void SetCallbacks(IPlayerActions instance)
556644
@VerticalMovement.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnVerticalMovement;
557645
@VerticalMovement.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnVerticalMovement;
558646
@VerticalMovement.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnVerticalMovement;
647+
@SelectLeft.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnSelectLeft;
648+
@SelectLeft.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnSelectLeft;
649+
@SelectLeft.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnSelectLeft;
650+
@SelectRight.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnSelectRight;
651+
@SelectRight.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnSelectRight;
652+
@SelectRight.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnSelectRight;
653+
@ZoomIn.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnZoomIn;
654+
@ZoomIn.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnZoomIn;
655+
@ZoomIn.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnZoomIn;
656+
@ZoomOut.started -= m_Wrapper.m_PlayerActionsCallbackInterface.OnZoomOut;
657+
@ZoomOut.performed -= m_Wrapper.m_PlayerActionsCallbackInterface.OnZoomOut;
658+
@ZoomOut.canceled -= m_Wrapper.m_PlayerActionsCallbackInterface.OnZoomOut;
559659
}
560660
m_Wrapper.m_PlayerActionsCallbackInterface = instance;
561661
if (instance != null)
@@ -566,6 +666,18 @@ public void SetCallbacks(IPlayerActions instance)
566666
@VerticalMovement.started += instance.OnVerticalMovement;
567667
@VerticalMovement.performed += instance.OnVerticalMovement;
568668
@VerticalMovement.canceled += instance.OnVerticalMovement;
669+
@SelectLeft.started += instance.OnSelectLeft;
670+
@SelectLeft.performed += instance.OnSelectLeft;
671+
@SelectLeft.canceled += instance.OnSelectLeft;
672+
@SelectRight.started += instance.OnSelectRight;
673+
@SelectRight.performed += instance.OnSelectRight;
674+
@SelectRight.canceled += instance.OnSelectRight;
675+
@ZoomIn.started += instance.OnZoomIn;
676+
@ZoomIn.performed += instance.OnZoomIn;
677+
@ZoomIn.canceled += instance.OnZoomIn;
678+
@ZoomOut.started += instance.OnZoomOut;
679+
@ZoomOut.performed += instance.OnZoomOut;
680+
@ZoomOut.canceled += instance.OnZoomOut;
569681
}
570682
}
571683
}
@@ -592,5 +704,9 @@ public interface IPlayerActions
592704
{
593705
void OnHorizontalMovement(InputAction.CallbackContext context);
594706
void OnVerticalMovement(InputAction.CallbackContext context);
707+
void OnSelectLeft(InputAction.CallbackContext context);
708+
void OnSelectRight(InputAction.CallbackContext context);
709+
void OnZoomIn(InputAction.CallbackContext context);
710+
void OnZoomOut(InputAction.CallbackContext context);
595711
}
596712
}

Assets/_Project/Input/TallyInputSystem.inputactions

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,38 @@
275275
"expectedControlType": "Axis",
276276
"processors": "",
277277
"interactions": ""
278+
},
279+
{
280+
"name": "SelectLeft",
281+
"type": "Button",
282+
"id": "642eb606-4a97-4d33-b73b-45620453c96d",
283+
"expectedControlType": "Button",
284+
"processors": "",
285+
"interactions": ""
286+
},
287+
{
288+
"name": "SelectRight",
289+
"type": "Button",
290+
"id": "96718a59-70f6-4072-8c60-62f078ce7280",
291+
"expectedControlType": "Button",
292+
"processors": "",
293+
"interactions": ""
294+
},
295+
{
296+
"name": "ZoomIn",
297+
"type": "Button",
298+
"id": "674cc3c2-ee52-4af9-8da6-f4ffe4b0a7ae",
299+
"expectedControlType": "Button",
300+
"processors": "",
301+
"interactions": ""
302+
},
303+
{
304+
"name": "ZoomOut",
305+
"type": "Button",
306+
"id": "5d09888a-b4c6-4dfa-8230-8ed03b2b451f",
307+
"expectedControlType": "Button",
308+
"processors": "",
309+
"interactions": ""
278310
}
279311
],
280312
"bindings": [
@@ -299,6 +331,50 @@
299331
"action": "VerticalMovement",
300332
"isComposite": false,
301333
"isPartOfComposite": false
334+
},
335+
{
336+
"name": "",
337+
"id": "91bc4016-3b05-4f64-991d-f468db222b53",
338+
"path": "<Keyboard>/leftArrow",
339+
"interactions": "",
340+
"processors": "",
341+
"groups": "",
342+
"action": "SelectLeft",
343+
"isComposite": false,
344+
"isPartOfComposite": false
345+
},
346+
{
347+
"name": "",
348+
"id": "8243ac7f-1b18-40ac-ad62-7c65a80554c0",
349+
"path": "<Keyboard>/rightArrow",
350+
"interactions": "",
351+
"processors": "",
352+
"groups": "",
353+
"action": "SelectRight",
354+
"isComposite": false,
355+
"isPartOfComposite": false
356+
},
357+
{
358+
"name": "",
359+
"id": "ffa8e996-cbf6-4c29-8047-ab5ea597c2fc",
360+
"path": "<Keyboard>/upArrow",
361+
"interactions": "",
362+
"processors": "",
363+
"groups": "",
364+
"action": "ZoomIn",
365+
"isComposite": false,
366+
"isPartOfComposite": false
367+
},
368+
{
369+
"name": "",
370+
"id": "53133cea-56df-4dfd-bead-1725b0d50780",
371+
"path": "<Keyboard>/downArrow",
372+
"interactions": "",
373+
"processors": "",
374+
"groups": "",
375+
"action": "ZoomOut",
376+
"isComposite": false,
377+
"isPartOfComposite": false
302378
}
303379
]
304380
}

0 commit comments

Comments
 (0)