-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyInputSystem.cs
956 lines (939 loc) · 42.1 KB
/
MyInputSystem.cs
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
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
//------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.3.0
// from Assets/MyInputSystem.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 @MyInputSystem : IInputActionCollection2, IDisposable
{
public InputActionAsset asset { get; }
public @MyInputSystem()
{
asset = InputActionAsset.FromJson(@"{
""name"": ""MyInputSystem"",
""maps"": [
{
""name"": ""All"",
""id"": ""738299f5-d171-4a57-a075-9fd65a2a2977"",
""actions"": [
{
""name"": ""Accelerometer"",
""type"": ""PassThrough"",
""id"": ""074f5740-5d41-4456-9e51-03d33a9f85fa"",
""expectedControlType"": ""Vector3"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": """",
""id"": ""deed5ec8-6c27-4a79-9794-28de299f743d"",
""path"": ""<Accelerometer>/acceleration"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Accelerometer"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
},
{
""name"": ""Panel1"",
""id"": ""73978e02-0458-455c-8c52-5386cb6e8654"",
""actions"": [
{
""name"": ""Joystickp1"",
""type"": ""PassThrough"",
""id"": ""1991d79f-fe9c-438b-8f5e-4a972a5dc22a"",
""expectedControlType"": ""Vector2"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""summon"",
""type"": ""Button"",
""id"": ""a1c29f8d-434c-46b4-8efe-e2e3ef49ae89"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""active"",
""type"": ""Button"",
""id"": ""42279b77-b858-40a5-b957-37e89a13f680"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""draw"",
""type"": ""Button"",
""id"": ""b5636c24-a0d4-4fa8-885d-744b3db9b16e"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": """",
""id"": ""f9b00a95-a29c-4558-8c72-e44de3dc9db7"",
""path"": ""<HID::ShanWan Corp. Bluetooth Gamepad >/stick"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Joystickp1"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""33c2bb58-93cf-4936-859a-33151dc4007a"",
""path"": ""<HID::ShanWan Corp. Bluetooth Gamepad >/button10"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""summon"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""4611fda6-cac2-4003-8171-7f839897f370"",
""path"": ""<HID::ShanWan Corp. Bluetooth Gamepad >/button4"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""active"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""819e1f9c-cc90-4e26-a43b-861213061e1b"",
""path"": ""<HID::ShanWan Corp. Bluetooth Gamepad >/button7"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""draw"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
},
{
""name"": ""Panel2"",
""id"": ""fcaccd20-f4fc-4f79-a165-da74423d97be"",
""actions"": [
{
""name"": ""Left"",
""type"": ""Button"",
""id"": ""d103c9b9-6430-4f39-8e4b-95258a004c07"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Right"",
""type"": ""Button"",
""id"": ""e943d55a-77e7-45c3-a8a1-84323ab7548a"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Up"",
""type"": ""Button"",
""id"": ""0358da42-b3dc-454e-9d52-6b0b576760b8"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Down"",
""type"": ""Button"",
""id"": ""dda2c219-7bb7-4df0-8799-8b29409478b6"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""active"",
""type"": ""Button"",
""id"": ""3443a124-86a9-4e86-b1e9-3745e107a4ab"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""attack"",
""type"": ""Button"",
""id"": ""7467c606-d66d-45af-99e4-4b4f36a91b65"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": """",
""id"": ""eb099e42-d498-4035-93b7-461262eed5f2"",
""path"": ""<HID::ShanWan Corp. Bluetooth Gamepad >/hat/left"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Left"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""163bd6e2-a042-42c9-9397-f3305a82889d"",
""path"": ""<HID::ShanWan Corp. Bluetooth Gamepad >/hat/right"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Right"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""b7c18364-d0d9-4169-b1e7-a2d3c911fb17"",
""path"": ""<HID::ShanWan Corp. Bluetooth Gamepad >/hat/up"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Up"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""9e76cd97-2008-4c7b-84c3-9de430356ea8"",
""path"": ""<HID::ShanWan Corp. Bluetooth Gamepad >/hat/down"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Down"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""fb7615ab-3a83-4ce7-8cff-3b910a2c6e92"",
""path"": ""<HID::ShanWan Corp. Bluetooth Gamepad >/button2"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""active"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""3496ec4c-7e36-4b4a-a24b-3ae9596461b8"",
""path"": ""<HID::ShanWan Corp. Bluetooth Gamepad >/button10"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""attack"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
},
{
""name"": ""Panel3"",
""id"": ""1b2ad924-b630-4d57-b205-42f52d6b055a"",
""actions"": [
{
""name"": ""active"",
""type"": ""Button"",
""id"": ""35ac8806-0700-446f-a88b-be0926f129d9"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""joystick"",
""type"": ""PassThrough"",
""id"": ""5747267e-3494-4f5e-aa6d-3275eaf42af2"",
""expectedControlType"": ""Vector2"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""summon"",
""type"": ""Button"",
""id"": ""035e77ce-2b8a-40c3-9246-8576c78e892b"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": """",
""id"": ""8568d709-85a5-4853-9263-166f9a35b46c"",
""path"": ""<HID::ShanWan Corp. Bluetooth Gamepad >/trigger"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""active"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""523e7fb8-dd01-433c-bb00-323cbcb087bb"",
""path"": ""<HID::ShanWan Corp. Bluetooth Gamepad >/stick"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""joystick"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""2046bec6-047c-48e7-b90f-0abf32050984"",
""path"": ""<HID::ShanWan Corp. Bluetooth Gamepad >/button10"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""summon"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
},
{
""name"": ""Test"",
""id"": ""ade5aa74-4728-4a61-881e-9aca6450385f"",
""actions"": [
{
""name"": ""Mouse"",
""type"": ""Button"",
""id"": ""4c1e9f8f-6855-4833-901d-fb4494cadadf"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""satu"",
""type"": ""Button"",
""id"": ""80ae35fe-b794-42f9-b110-1653bbda290e"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""dua"",
""type"": ""Button"",
""id"": ""3b6eef66-68c0-4cbb-9705-55e0bccd683a"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""tiga"",
""type"": ""Button"",
""id"": ""d6c7550c-e195-4967-bdc1-572e8cf99de3"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""getHit"",
""type"": ""Button"",
""id"": ""c541697c-423d-4758-bd37-3971cd319576"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""die"",
""type"": ""Button"",
""id"": ""09a4d182-6687-4276-9ec5-01089014541d"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""walk"",
""type"": ""Button"",
""id"": ""9bce1d01-b345-46be-934c-505857a46e05"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""stop"",
""type"": ""Button"",
""id"": ""d47d300c-ea1f-4f85-965b-a6c43a3f9f1e"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": """",
""id"": ""975a04ca-a160-4220-9d99-7ca151d2cea1"",
""path"": ""<Mouse>/leftButton"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Mouse"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""8b8164ed-1fc1-4f37-8223-363bb320f613"",
""path"": ""<Joystick>/trigger"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""satu"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""cff831ff-b46a-4564-91c9-71780ef86640"",
""path"": ""<Keyboard>/1"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""satu"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""4719c1e2-f624-44bd-85a9-5cdc2b09c628"",
""path"": ""<HID::Microntek USB Joystick >/button2"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""dua"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""c344d83c-ed98-4cd2-a1b9-4aa1f9b22c7b"",
""path"": ""<Keyboard>/2"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""dua"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""fb2cafe4-71db-4287-8734-1ab0ad7f10d3"",
""path"": ""<Keyboard>/3"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""getHit"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""6e838788-269c-422e-bb24-89de64d4345e"",
""path"": ""<Keyboard>/4"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""die"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""af7b574f-3ee1-459e-b0fe-3776c61539e6"",
""path"": ""<Keyboard>/upArrow"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""walk"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""d7105606-f41e-4a73-af3d-caa80ba137f0"",
""path"": ""<Keyboard>/downArrow"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""stop"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""81b53345-4090-4656-a9fe-6b9e20c8a2d8"",
""path"": ""<Keyboard>/5"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""tiga"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
}
],
""controlSchemes"": []
}");
// All
m_All = asset.FindActionMap("All", throwIfNotFound: true);
m_All_Accelerometer = m_All.FindAction("Accelerometer", throwIfNotFound: true);
// Panel1
m_Panel1 = asset.FindActionMap("Panel1", throwIfNotFound: true);
m_Panel1_Joystickp1 = m_Panel1.FindAction("Joystickp1", throwIfNotFound: true);
m_Panel1_summon = m_Panel1.FindAction("summon", throwIfNotFound: true);
m_Panel1_active = m_Panel1.FindAction("active", throwIfNotFound: true);
m_Panel1_draw = m_Panel1.FindAction("draw", throwIfNotFound: true);
// Panel2
m_Panel2 = asset.FindActionMap("Panel2", throwIfNotFound: true);
m_Panel2_Left = m_Panel2.FindAction("Left", throwIfNotFound: true);
m_Panel2_Right = m_Panel2.FindAction("Right", throwIfNotFound: true);
m_Panel2_Up = m_Panel2.FindAction("Up", throwIfNotFound: true);
m_Panel2_Down = m_Panel2.FindAction("Down", throwIfNotFound: true);
m_Panel2_active = m_Panel2.FindAction("active", throwIfNotFound: true);
m_Panel2_attack = m_Panel2.FindAction("attack", throwIfNotFound: true);
// Panel3
m_Panel3 = asset.FindActionMap("Panel3", throwIfNotFound: true);
m_Panel3_active = m_Panel3.FindAction("active", throwIfNotFound: true);
m_Panel3_joystick = m_Panel3.FindAction("joystick", throwIfNotFound: true);
m_Panel3_summon = m_Panel3.FindAction("summon", throwIfNotFound: true);
// Test
m_Test = asset.FindActionMap("Test", throwIfNotFound: true);
m_Test_Mouse = m_Test.FindAction("Mouse", throwIfNotFound: true);
m_Test_satu = m_Test.FindAction("satu", throwIfNotFound: true);
m_Test_dua = m_Test.FindAction("dua", throwIfNotFound: true);
m_Test_tiga = m_Test.FindAction("tiga", throwIfNotFound: true);
m_Test_getHit = m_Test.FindAction("getHit", throwIfNotFound: true);
m_Test_die = m_Test.FindAction("die", throwIfNotFound: true);
m_Test_walk = m_Test.FindAction("walk", throwIfNotFound: true);
m_Test_stop = m_Test.FindAction("stop", 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);
}
// All
private readonly InputActionMap m_All;
private IAllActions m_AllActionsCallbackInterface;
private readonly InputAction m_All_Accelerometer;
public struct AllActions
{
private @MyInputSystem m_Wrapper;
public AllActions(@MyInputSystem wrapper) { m_Wrapper = wrapper; }
public InputAction @Accelerometer => m_Wrapper.m_All_Accelerometer;
public InputActionMap Get() { return m_Wrapper.m_All; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(AllActions set) { return set.Get(); }
public void SetCallbacks(IAllActions instance)
{
if (m_Wrapper.m_AllActionsCallbackInterface != null)
{
@Accelerometer.started -= m_Wrapper.m_AllActionsCallbackInterface.OnAccelerometer;
@Accelerometer.performed -= m_Wrapper.m_AllActionsCallbackInterface.OnAccelerometer;
@Accelerometer.canceled -= m_Wrapper.m_AllActionsCallbackInterface.OnAccelerometer;
}
m_Wrapper.m_AllActionsCallbackInterface = instance;
if (instance != null)
{
@Accelerometer.started += instance.OnAccelerometer;
@Accelerometer.performed += instance.OnAccelerometer;
@Accelerometer.canceled += instance.OnAccelerometer;
}
}
}
public AllActions @All => new AllActions(this);
// Panel1
private readonly InputActionMap m_Panel1;
private IPanel1Actions m_Panel1ActionsCallbackInterface;
private readonly InputAction m_Panel1_Joystickp1;
private readonly InputAction m_Panel1_summon;
private readonly InputAction m_Panel1_active;
private readonly InputAction m_Panel1_draw;
public struct Panel1Actions
{
private @MyInputSystem m_Wrapper;
public Panel1Actions(@MyInputSystem wrapper) { m_Wrapper = wrapper; }
public InputAction @Joystickp1 => m_Wrapper.m_Panel1_Joystickp1;
public InputAction @summon => m_Wrapper.m_Panel1_summon;
public InputAction @active => m_Wrapper.m_Panel1_active;
public InputAction @draw => m_Wrapper.m_Panel1_draw;
public InputActionMap Get() { return m_Wrapper.m_Panel1; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(Panel1Actions set) { return set.Get(); }
public void SetCallbacks(IPanel1Actions instance)
{
if (m_Wrapper.m_Panel1ActionsCallbackInterface != null)
{
@Joystickp1.started -= m_Wrapper.m_Panel1ActionsCallbackInterface.OnJoystickp1;
@Joystickp1.performed -= m_Wrapper.m_Panel1ActionsCallbackInterface.OnJoystickp1;
@Joystickp1.canceled -= m_Wrapper.m_Panel1ActionsCallbackInterface.OnJoystickp1;
@summon.started -= m_Wrapper.m_Panel1ActionsCallbackInterface.OnSummon;
@summon.performed -= m_Wrapper.m_Panel1ActionsCallbackInterface.OnSummon;
@summon.canceled -= m_Wrapper.m_Panel1ActionsCallbackInterface.OnSummon;
@active.started -= m_Wrapper.m_Panel1ActionsCallbackInterface.OnActive;
@active.performed -= m_Wrapper.m_Panel1ActionsCallbackInterface.OnActive;
@active.canceled -= m_Wrapper.m_Panel1ActionsCallbackInterface.OnActive;
@draw.started -= m_Wrapper.m_Panel1ActionsCallbackInterface.OnDraw;
@draw.performed -= m_Wrapper.m_Panel1ActionsCallbackInterface.OnDraw;
@draw.canceled -= m_Wrapper.m_Panel1ActionsCallbackInterface.OnDraw;
}
m_Wrapper.m_Panel1ActionsCallbackInterface = instance;
if (instance != null)
{
@Joystickp1.started += instance.OnJoystickp1;
@Joystickp1.performed += instance.OnJoystickp1;
@Joystickp1.canceled += instance.OnJoystickp1;
@summon.started += instance.OnSummon;
@summon.performed += instance.OnSummon;
@summon.canceled += instance.OnSummon;
@active.started += instance.OnActive;
@active.performed += instance.OnActive;
@active.canceled += instance.OnActive;
@draw.started += instance.OnDraw;
@draw.performed += instance.OnDraw;
@draw.canceled += instance.OnDraw;
}
}
}
public Panel1Actions @Panel1 => new Panel1Actions(this);
// Panel2
private readonly InputActionMap m_Panel2;
private IPanel2Actions m_Panel2ActionsCallbackInterface;
private readonly InputAction m_Panel2_Left;
private readonly InputAction m_Panel2_Right;
private readonly InputAction m_Panel2_Up;
private readonly InputAction m_Panel2_Down;
private readonly InputAction m_Panel2_active;
private readonly InputAction m_Panel2_attack;
public struct Panel2Actions
{
private @MyInputSystem m_Wrapper;
public Panel2Actions(@MyInputSystem wrapper) { m_Wrapper = wrapper; }
public InputAction @Left => m_Wrapper.m_Panel2_Left;
public InputAction @Right => m_Wrapper.m_Panel2_Right;
public InputAction @Up => m_Wrapper.m_Panel2_Up;
public InputAction @Down => m_Wrapper.m_Panel2_Down;
public InputAction @active => m_Wrapper.m_Panel2_active;
public InputAction @attack => m_Wrapper.m_Panel2_attack;
public InputActionMap Get() { return m_Wrapper.m_Panel2; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(Panel2Actions set) { return set.Get(); }
public void SetCallbacks(IPanel2Actions instance)
{
if (m_Wrapper.m_Panel2ActionsCallbackInterface != null)
{
@Left.started -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnLeft;
@Left.performed -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnLeft;
@Left.canceled -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnLeft;
@Right.started -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnRight;
@Right.performed -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnRight;
@Right.canceled -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnRight;
@Up.started -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnUp;
@Up.performed -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnUp;
@Up.canceled -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnUp;
@Down.started -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnDown;
@Down.performed -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnDown;
@Down.canceled -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnDown;
@active.started -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnActive;
@active.performed -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnActive;
@active.canceled -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnActive;
@attack.started -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnAttack;
@attack.performed -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnAttack;
@attack.canceled -= m_Wrapper.m_Panel2ActionsCallbackInterface.OnAttack;
}
m_Wrapper.m_Panel2ActionsCallbackInterface = instance;
if (instance != null)
{
@Left.started += instance.OnLeft;
@Left.performed += instance.OnLeft;
@Left.canceled += instance.OnLeft;
@Right.started += instance.OnRight;
@Right.performed += instance.OnRight;
@Right.canceled += instance.OnRight;
@Up.started += instance.OnUp;
@Up.performed += instance.OnUp;
@Up.canceled += instance.OnUp;
@Down.started += instance.OnDown;
@Down.performed += instance.OnDown;
@Down.canceled += instance.OnDown;
@active.started += instance.OnActive;
@active.performed += instance.OnActive;
@active.canceled += instance.OnActive;
@attack.started += instance.OnAttack;
@attack.performed += instance.OnAttack;
@attack.canceled += instance.OnAttack;
}
}
}
public Panel2Actions @Panel2 => new Panel2Actions(this);
// Panel3
private readonly InputActionMap m_Panel3;
private IPanel3Actions m_Panel3ActionsCallbackInterface;
private readonly InputAction m_Panel3_active;
private readonly InputAction m_Panel3_joystick;
private readonly InputAction m_Panel3_summon;
public struct Panel3Actions
{
private @MyInputSystem m_Wrapper;
public Panel3Actions(@MyInputSystem wrapper) { m_Wrapper = wrapper; }
public InputAction @active => m_Wrapper.m_Panel3_active;
public InputAction @joystick => m_Wrapper.m_Panel3_joystick;
public InputAction @summon => m_Wrapper.m_Panel3_summon;
public InputActionMap Get() { return m_Wrapper.m_Panel3; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(Panel3Actions set) { return set.Get(); }
public void SetCallbacks(IPanel3Actions instance)
{
if (m_Wrapper.m_Panel3ActionsCallbackInterface != null)
{
@active.started -= m_Wrapper.m_Panel3ActionsCallbackInterface.OnActive;
@active.performed -= m_Wrapper.m_Panel3ActionsCallbackInterface.OnActive;
@active.canceled -= m_Wrapper.m_Panel3ActionsCallbackInterface.OnActive;
@joystick.started -= m_Wrapper.m_Panel3ActionsCallbackInterface.OnJoystick;
@joystick.performed -= m_Wrapper.m_Panel3ActionsCallbackInterface.OnJoystick;
@joystick.canceled -= m_Wrapper.m_Panel3ActionsCallbackInterface.OnJoystick;
@summon.started -= m_Wrapper.m_Panel3ActionsCallbackInterface.OnSummon;
@summon.performed -= m_Wrapper.m_Panel3ActionsCallbackInterface.OnSummon;
@summon.canceled -= m_Wrapper.m_Panel3ActionsCallbackInterface.OnSummon;
}
m_Wrapper.m_Panel3ActionsCallbackInterface = instance;
if (instance != null)
{
@active.started += instance.OnActive;
@active.performed += instance.OnActive;
@active.canceled += instance.OnActive;
@joystick.started += instance.OnJoystick;
@joystick.performed += instance.OnJoystick;
@joystick.canceled += instance.OnJoystick;
@summon.started += instance.OnSummon;
@summon.performed += instance.OnSummon;
@summon.canceled += instance.OnSummon;
}
}
}
public Panel3Actions @Panel3 => new Panel3Actions(this);
// Test
private readonly InputActionMap m_Test;
private ITestActions m_TestActionsCallbackInterface;
private readonly InputAction m_Test_Mouse;
private readonly InputAction m_Test_satu;
private readonly InputAction m_Test_dua;
private readonly InputAction m_Test_tiga;
private readonly InputAction m_Test_getHit;
private readonly InputAction m_Test_die;
private readonly InputAction m_Test_walk;
private readonly InputAction m_Test_stop;
public struct TestActions
{
private @MyInputSystem m_Wrapper;
public TestActions(@MyInputSystem wrapper) { m_Wrapper = wrapper; }
public InputAction @Mouse => m_Wrapper.m_Test_Mouse;
public InputAction @satu => m_Wrapper.m_Test_satu;
public InputAction @dua => m_Wrapper.m_Test_dua;
public InputAction @tiga => m_Wrapper.m_Test_tiga;
public InputAction @getHit => m_Wrapper.m_Test_getHit;
public InputAction @die => m_Wrapper.m_Test_die;
public InputAction @walk => m_Wrapper.m_Test_walk;
public InputAction @stop => m_Wrapper.m_Test_stop;
public InputActionMap Get() { return m_Wrapper.m_Test; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(TestActions set) { return set.Get(); }
public void SetCallbacks(ITestActions instance)
{
if (m_Wrapper.m_TestActionsCallbackInterface != null)
{
@Mouse.started -= m_Wrapper.m_TestActionsCallbackInterface.OnMouse;
@Mouse.performed -= m_Wrapper.m_TestActionsCallbackInterface.OnMouse;
@Mouse.canceled -= m_Wrapper.m_TestActionsCallbackInterface.OnMouse;
@satu.started -= m_Wrapper.m_TestActionsCallbackInterface.OnSatu;
@satu.performed -= m_Wrapper.m_TestActionsCallbackInterface.OnSatu;
@satu.canceled -= m_Wrapper.m_TestActionsCallbackInterface.OnSatu;
@dua.started -= m_Wrapper.m_TestActionsCallbackInterface.OnDua;
@dua.performed -= m_Wrapper.m_TestActionsCallbackInterface.OnDua;
@dua.canceled -= m_Wrapper.m_TestActionsCallbackInterface.OnDua;
@tiga.started -= m_Wrapper.m_TestActionsCallbackInterface.OnTiga;
@tiga.performed -= m_Wrapper.m_TestActionsCallbackInterface.OnTiga;
@tiga.canceled -= m_Wrapper.m_TestActionsCallbackInterface.OnTiga;
@getHit.started -= m_Wrapper.m_TestActionsCallbackInterface.OnGetHit;
@getHit.performed -= m_Wrapper.m_TestActionsCallbackInterface.OnGetHit;
@getHit.canceled -= m_Wrapper.m_TestActionsCallbackInterface.OnGetHit;
@die.started -= m_Wrapper.m_TestActionsCallbackInterface.OnDie;
@die.performed -= m_Wrapper.m_TestActionsCallbackInterface.OnDie;
@die.canceled -= m_Wrapper.m_TestActionsCallbackInterface.OnDie;
@walk.started -= m_Wrapper.m_TestActionsCallbackInterface.OnWalk;
@walk.performed -= m_Wrapper.m_TestActionsCallbackInterface.OnWalk;
@walk.canceled -= m_Wrapper.m_TestActionsCallbackInterface.OnWalk;
@stop.started -= m_Wrapper.m_TestActionsCallbackInterface.OnStop;
@stop.performed -= m_Wrapper.m_TestActionsCallbackInterface.OnStop;
@stop.canceled -= m_Wrapper.m_TestActionsCallbackInterface.OnStop;
}
m_Wrapper.m_TestActionsCallbackInterface = instance;
if (instance != null)
{
@Mouse.started += instance.OnMouse;
@Mouse.performed += instance.OnMouse;
@Mouse.canceled += instance.OnMouse;
@satu.started += instance.OnSatu;
@satu.performed += instance.OnSatu;
@satu.canceled += instance.OnSatu;
@dua.started += instance.OnDua;
@dua.performed += instance.OnDua;
@dua.canceled += instance.OnDua;
@tiga.started += instance.OnTiga;
@tiga.performed += instance.OnTiga;
@tiga.canceled += instance.OnTiga;
@getHit.started += instance.OnGetHit;
@getHit.performed += instance.OnGetHit;
@getHit.canceled += instance.OnGetHit;
@die.started += instance.OnDie;
@die.performed += instance.OnDie;
@die.canceled += instance.OnDie;
@walk.started += instance.OnWalk;
@walk.performed += instance.OnWalk;
@walk.canceled += instance.OnWalk;
@stop.started += instance.OnStop;
@stop.performed += instance.OnStop;
@stop.canceled += instance.OnStop;
}
}
}
public TestActions @Test => new TestActions(this);
public interface IAllActions
{
void OnAccelerometer(InputAction.CallbackContext context);
}
public interface IPanel1Actions
{
void OnJoystickp1(InputAction.CallbackContext context);
void OnSummon(InputAction.CallbackContext context);
void OnActive(InputAction.CallbackContext context);
void OnDraw(InputAction.CallbackContext context);
}
public interface IPanel2Actions
{
void OnLeft(InputAction.CallbackContext context);
void OnRight(InputAction.CallbackContext context);
void OnUp(InputAction.CallbackContext context);
void OnDown(InputAction.CallbackContext context);
void OnActive(InputAction.CallbackContext context);
void OnAttack(InputAction.CallbackContext context);
}
public interface IPanel3Actions
{
void OnActive(InputAction.CallbackContext context);
void OnJoystick(InputAction.CallbackContext context);
void OnSummon(InputAction.CallbackContext context);
}
public interface ITestActions
{
void OnMouse(InputAction.CallbackContext context);
void OnSatu(InputAction.CallbackContext context);
void OnDua(InputAction.CallbackContext context);
void OnTiga(InputAction.CallbackContext context);
void OnGetHit(InputAction.CallbackContext context);
void OnDie(InputAction.CallbackContext context);
void OnWalk(InputAction.CallbackContext context);
void OnStop(InputAction.CallbackContext context);
}
}