summaryrefslogtreecommitdiff
path: root/Library/Artifacts/a4/a485dc63fb8818e8dbd293fd3477bdb7
blob: b545c03eb3ebad448039e6d6940f1bb19c4df9fe (plain)
ofshex dumpascii
0000 00 00 0f 81 00 00 95 88 00 00 00 15 00 00 10 00 00 00 00 00 32 30 31 39 2e 33 2e 36 66 31 00 fe ....................2019.3.6f1..
0020 ff ff ff 01 02 00 00 00 0b 04 00 00 00 ff ff 66 9a 86 21 eb 14 35 98 39 dd 34 1d 51 0e c1 f3 42 ...............f..!..5.9.4.Q...B
0040 00 00 00 ed 00 00 00 02 00 00 00 00 00 00 00 37 00 00 80 ff ff ff ff 00 00 00 00 00 80 00 00 00 ...............7................
0060 00 00 00 00 00 00 00 01 00 01 00 a6 03 00 80 b2 01 00 80 04 00 00 00 01 00 00 00 01 00 00 00 00 ................................
0080 00 00 00 00 00 00 00 01 00 01 00 0d 00 00 00 45 04 00 80 0c 00 00 00 02 00 00 00 01 00 00 00 00 ...............E................
00a0 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 03 00 00 00 01 00 80 00 00 ...............#................
00c0 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 04 00 00 00 01 00 80 00 00 ...............,................
00e0 00 00 00 00 00 00 00 01 00 01 00 35 00 00 00 61 04 00 80 0c 00 00 00 05 00 00 00 01 00 00 00 00 ...........5...a................
0100 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 06 00 00 00 01 00 80 00 00 ...............#................
0120 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 07 00 00 00 01 00 80 00 00 ...............,................
0140 00 00 00 00 00 00 00 01 00 01 00 86 02 00 80 72 04 00 80 0c 00 00 00 08 00 00 00 01 00 00 00 00 ...............r................
0160 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 09 00 00 00 01 00 80 00 00 ...............#................
0180 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 0a 00 00 00 01 00 80 00 00 ...............,................
01a0 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ab 01 00 80 ff ff ff ff 0b 00 00 00 01 80 08 00 00 ...........H....................
01c0 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 0c 00 00 00 01 40 08 00 00 ...........1...1............@...
01e0 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 0d 00 00 00 01 00 08 00 00 ................................
0200 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 0e 00 00 00 01 00 08 00 00 ...........Q...j................
0220 00 00 00 00 00 00 00 01 00 01 00 f1 00 00 80 4a 00 00 00 ff ff ff ff 0f 00 00 00 00 c0 00 00 00 ...............J................
0240 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 10 00 00 00 00 80 00 00 00 ...........1...1................
0260 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 11 00 00 00 00 00 00 00 00 ................................
0280 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a 00 00 80 ff ff ff ff 12 00 00 00 00 80 00 00 00 ...............j................
02a0 00 00 00 00 00 00 00 01 00 04 00 5c 00 00 00 9b 00 00 80 ff ff ff ff 13 00 00 00 00 80 00 00 00 ...........\....................
02c0 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 72 00 00 00 ff ff ff ff 14 00 00 00 00 80 00 00 00 ...........H...r................
02e0 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 15 00 00 00 01 40 00 00 00 ...........1...1............@...
0300 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 16 00 00 00 01 00 00 00 00 ................................
0320 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 17 00 00 00 01 00 00 00 00 ...........Q...j................
0340 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 77 00 00 00 ff ff ff ff 18 00 00 00 00 80 00 00 00 ...........H...w................
0360 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 19 00 00 00 01 40 00 00 00 ...........1...1............@...
0380 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 1a 00 00 00 01 00 00 00 00 ................................
03a0 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 1b 00 00 00 01 00 00 00 00 ...........Q...j................
03c0 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 80 00 00 00 ff ff ff ff 1c 00 00 00 00 80 00 00 00 ...........H....................
03e0 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 1d 00 00 00 01 40 00 00 00 ...........1...1............@...
0400 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 1e 00 00 00 01 00 00 00 00 ................................
0420 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 1f 00 00 00 01 00 00 00 00 ...........Q...j................
0440 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a 03 00 80 0c 00 00 00 20 00 00 00 00 00 00 00 00 ...........y....................
0460 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 23 00 00 00 04 00 00 00 21 00 00 00 01 00 80 00 00 ...............#.......!........
0480 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 2c 00 00 00 08 00 00 00 22 00 00 00 01 00 80 00 00 ...............,......."........
04a0 00 00 00 00 00 00 00 01 00 01 00 11 03 00 80 85 00 00 00 ff ff ff ff 23 00 00 00 01 40 08 00 00 .......................#....@...
04c0 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 24 00 00 00 01 00 08 00 00 ...........1...1.......$........
04e0 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 25 00 00 00 01 00 08 00 00 .......................%........
0500 00 00 00 00 00 00 00 01 00 03 00 2e 03 00 80 6a 00 00 80 08 00 00 00 26 00 00 00 01 00 08 00 00 ...............j.......&........
0520 00 00 00 00 00 00 00 01 00 01 00 d5 03 00 80 93 00 00 00 ff ff ff ff 27 00 00 00 00 80 00 00 00 .......................'........
0540 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 28 00 00 00 00 c0 00 00 00 ...........1...1.......(........
0560 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 29 00 00 00 00 00 00 00 00 .......................)........
0580 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a 00 00 80 ff ff ff ff 2a 00 00 00 00 80 00 00 00 ...............j.......*........
05a0 00 00 00 00 00 00 00 01 00 04 00 48 03 00 80 9b 00 00 80 ff ff ff ff 2b 00 00 00 00 80 00 00 00 ...........H...........+........
05c0 00 00 00 00 00 00 00 01 00 05 01 31 00 00 80 31 00 00 80 ff ff ff ff 2c 00 00 00 01 40 00 00 00 ...........1...1.......,....@...
05e0 00 00 00 00 00 00 00 01 00 06 00 de 00 00 80 1b 03 00 80 04 00 00 00 2d 00 00 00 01 00 00 00 00 .......................-........
0600 00 00 00 00 00 00 00 01 00 06 00 51 00 00 80 6a 00 00 80 01 00 00 00 2e 00 00 00 01 00 00 00 00 ...........Q...j................
0620 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a 03 00 80 0c 00 00 00 2f 00 00 00 00 00 00 00 00 ...........y.........../........
0640 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 23 00 00 00 04 00 00 00 30 00 00 00 01 00 80 00 00 ...............#.......0........
0660 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 2c 00 00 00 08 00 00 00 31 00 00 00 01 00 80 00 00 ...............,.......1........
0680 00 00 00 00 00 00 00 01 00 01 00 20 03 00 80 a7 00 00 00 02 00 00 00 32 00 00 00 00 40 00 00 00 .......................2....@...
06a0 00 00 00 00 00 00 00 01 00 01 00 be 02 00 80 b6 00 00 00 0c 00 00 00 33 00 00 00 00 40 00 00 00 .......................3....@...
06c0 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 34 00 00 00 01 00 80 00 00 ...............#.......4........
06e0 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 35 00 00 00 01 00 80 00 00 ...............,.......5........
0700 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 bb 00 00 00 ff ff ff ff 36 00 00 00 01 80 00 00 00 ...........H...........6........
0720 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 37 00 00 00 01 40 00 00 00 ...........1...1.......7....@...
0740 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 38 00 00 00 01 00 00 00 00 .......................8........
0760 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 39 00 00 00 01 00 00 00 00 ...........Q...j.......9........
0780 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 c6 00 00 00 ff ff ff ff 3a 00 00 00 01 80 00 00 00 ...........H...........:........
07a0 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 3b 00 00 00 01 40 00 00 00 ...........1...1.......;....@...
07c0 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 3c 00 00 00 01 00 00 00 00 .......................<........
07e0 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 3d 00 00 00 01 00 00 00 00 ...........Q...j.......=........
0800 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 d8 00 00 00 ff ff ff ff 3e 00 00 00 01 80 00 00 00 ...........H...........>........
0820 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 3f 00 00 00 01 40 00 00 00 ...........1...1.......?....@...
0840 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 40 00 00 00 01 00 00 00 00 .......................@........
0860 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 41 00 00 00 01 00 00 00 00 ...........Q...j.......A........
0880 00 00 00 00 00 00 00 4d 6f 6e 6f 49 6d 70 6f 72 74 65 72 00 50 50 74 72 3c 45 64 69 74 6f 72 45 .......MonoImporter.PPtr<EditorE
08a0 78 74 65 6e 73 69 6f 6e 3e 00 6d 5f 46 69 6c 65 49 44 00 6d 5f 50 61 74 68 49 44 00 50 50 74 72 xtension>.m_FileID.m_PathID.PPtr
08c0 3c 50 72 65 66 61 62 49 6e 73 74 61 6e 63 65 3e 00 6d 5f 45 78 74 65 72 6e 61 6c 4f 62 6a 65 63 <PrefabInstance>.m_ExternalObjec
08e0 74 73 00 53 6f 75 72 63 65 41 73 73 65 74 49 64 65 6e 74 69 66 69 65 72 00 74 79 70 65 00 61 73 ts.SourceAssetIdentifier.type.as
0900 73 65 6d 62 6c 79 00 6e 61 6d 65 00 6d 5f 55 73 65 64 46 69 6c 65 49 44 73 00 6d 5f 44 65 66 61 sembly.name.m_UsedFileIDs.m_Defa
0920 75 6c 74 52 65 66 65 72 65 6e 63 65 73 00 65 78 65 63 75 74 69 6f 6e 4f 72 64 65 72 00 69 63 6f ultReferences.executionOrder.ico
0940 6e 00 6d 5f 55 73 65 72 44 61 74 61 00 6d 5f 41 73 73 65 74 42 75 6e 64 6c 65 4e 61 6d 65 00 6d n.m_UserData.m_AssetBundleName.m
0960 5f 41 73 73 65 74 42 75 6e 64 6c 65 56 61 72 69 61 6e 74 00 00 00 00 00 73 00 00 00 00 ff ff a3 _AssetBundleVariant.....s.......
0980 47 f1 d7 dc 8f 5a 35 36 a0 3a 21 40 69 c1 4a 2a 00 00 00 81 00 00 00 05 00 00 00 15 01 00 80 37 G....Z56.:!@i.J*...............7
09a0 00 00 80 ff ff ff ff 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 01 00 01 00 a6 03 00 80 b2 ................................
09c0 01 00 80 04 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 00 00 00 00 45 ...............................E
09e0 04 00 80 0c 00 00 00 02 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 ................................
0a00 00 00 00 04 00 00 00 03 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f ................................
0a20 00 00 00 08 00 00 00 04 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 28 00 00 00 61 ...........................(...a
0a40 04 00 80 0c 00 00 00 05 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 ................................
0a60 00 00 00 04 00 00 00 06 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f ................................
0a80 00 00 00 08 00 00 00 07 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 86 02 00 80 72 ...............................r
0aa0 04 00 80 0c 00 00 00 08 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 ................................
0ac0 00 00 00 04 00 00 00 09 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f ................................
0ae0 00 00 00 08 00 00 00 0a 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ab ...........................H....
0b00 01 00 80 ff ff ff ff 0b 00 00 00 01 80 08 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 ...........................1...1
0b20 00 00 80 ff ff ff ff 0c 00 00 00 01 40 08 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b ............@...................
0b40 03 00 80 04 00 00 00 0d 00 00 00 01 00 08 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a ...........................Q...j
0b60 00 00 80 01 00 00 00 0e 00 00 00 01 00 08 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ea ...........................H....
0b80 01 00 80 ff ff ff ff 0f 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 ...........................1...1
0ba0 00 00 80 ff ff ff ff 10 00 00 00 01 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b ............@...................
0bc0 03 00 80 04 00 00 00 11 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a ...........................Q...j
0be0 00 00 80 01 00 00 00 12 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 f1 00 00 80 3d ...............................=
0c00 00 00 00 ff ff ff ff 13 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 ...........................1...1
0c20 00 00 80 ff ff ff ff 14 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b ................................
0c40 03 00 80 04 00 00 00 15 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a ...............................j
0c60 00 00 80 ff ff ff ff 16 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 04 00 48 03 00 80 9b ...........................H....
0c80 00 00 80 ff ff ff ff 17 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 05 01 31 00 00 80 31 ...........................1...1
0ca0 00 00 80 ff ff ff ff 18 00 00 00 01 40 00 00 00 00 00 00 00 00 00 00 01 00 06 00 de 00 00 80 1b ............@...................
0cc0 03 00 80 04 00 00 00 19 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 06 00 51 00 00 80 6a ...........................Q...j
0ce0 00 00 80 01 00 00 00 1a 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a ...........................y....
0d00 03 00 80 0c 00 00 00 1b 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 16 ................................
0d20 00 00 00 04 00 00 00 1c 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 1f ................................
0d40 00 00 00 08 00 00 00 1d 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 79 02 00 80 51 ...........................y...Q
0d60 00 00 00 0c 00 00 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 ................................
0d80 00 00 00 04 00 00 00 1f 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f ................................
0da0 00 00 00 08 00 00 00 20 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 de 00 00 80 58 ...............................X
0dc0 00 00 00 04 00 00 00 21 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 69 .......!...................H...i
0de0 00 00 00 ff ff ff ff 22 00 00 00 10 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 ......."...................1...1
0e00 00 00 80 ff ff ff ff 23 00 00 00 11 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b .......#....@...................
0e20 03 00 80 04 00 00 00 24 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a .......$...................Q...j
0e40 00 00 80 01 00 00 00 25 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 75 .......%...................H...u
0e60 00 00 00 ff ff ff ff 26 00 00 00 10 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 .......&...................1...1
0e80 00 00 80 ff ff ff ff 27 00 00 00 11 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b .......'....@...................
0ea0 03 00 80 04 00 00 00 28 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a .......(...................Q...j
0ec0 00 00 80 01 00 00 00 29 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 50 50 74 72 3c 45 64 69 74 .......)...............PPtr<Edit
0ee0 6f 72 45 78 74 65 6e 73 69 6f 6e 3e 00 6d 5f 46 69 6c 65 49 44 00 6d 5f 50 61 74 68 49 44 00 50 orExtension>.m_FileID.m_PathID.P
0f00 50 74 72 3c 50 72 65 66 61 62 49 6e 73 74 61 6e 63 65 3e 00 6d 5f 44 65 66 61 75 6c 74 52 65 66 Ptr<PrefabInstance>.m_DefaultRef
0f20 65 72 65 6e 63 65 73 00 6d 5f 49 63 6f 6e 00 6d 5f 45 78 65 63 75 74 69 6f 6e 4f 72 64 65 72 00 erences.m_Icon.m_ExecutionOrder.
0f40 6d 5f 43 6c 61 73 73 4e 61 6d 65 00 6d 5f 4e 61 6d 65 73 70 61 63 65 00 00 00 00 00 02 00 00 00 m_ClassName.m_Namespace.........
0f60 03 00 00 00 00 00 00 00 00 00 00 00 5c 00 00 00 00 00 00 00 e0 79 af 00 00 00 00 00 60 00 00 00 ............\........y......`...
0f80 28 85 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (...............................
0fa0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0fc0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
0fe0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 e0 79 af 00 00 00 00 00 00 00 00 00 .....................y..........
1040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................
1080 00 00 00 00 00 00 00 00 10 00 00 00 49 6e 70 75 74 54 65 73 74 46 69 78 74 75 72 65 a2 84 00 00 ............InputTestFixture....
10a0 75 73 69 6e 67 20 53 79 73 74 65 6d 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 43 6f 6c 6c using.System;..using.System.Coll
10c0 65 63 74 69 6f 6e 73 2e 47 65 6e 65 72 69 63 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 4c ections.Generic;..using.System.L
10e0 69 6e 71 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 inq;..using.UnityEngine.InputSys
1100 74 65 6d 2e 43 6f 6e 74 72 6f 6c 73 3b 0d 0a 75 73 69 6e 67 20 4e 55 6e 69 74 2e 46 72 61 6d 65 tem.Controls;..using.NUnit.Frame
1120 77 6f 72 6b 3b 0d 0a 75 73 69 6e 67 20 4e 55 6e 69 74 2e 46 72 61 6d 65 77 6f 72 6b 2e 43 6f 6e work;..using.NUnit.Framework.Con
1140 73 74 72 61 69 6e 74 73 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 2e 43 6f 6c 6c 65 63 74 69 6f straints;..using.Unity.Collectio
1160 6e 73 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 ns;..using.UnityEngine.InputSyst
1180 65 6d 2e 4c 6f 77 4c 65 76 65 6c 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e em.LowLevel;..using.UnityEngine.
11a0 49 6e 70 75 74 53 79 73 74 65 6d 2e 55 74 69 6c 69 74 69 65 73 3b 0d 0a 75 73 69 6e 67 20 55 6e InputSystem.Utilities;..using.Un
11c0 69 74 79 45 6e 67 69 6e 65 2e 53 63 65 6e 65 4d 61 6e 61 67 65 6d 65 6e 74 3b 0d 0a 75 73 69 6e ityEngine.SceneManagement;..usin
11e0 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 54 65 73 74 54 6f 6f 6c 73 2e 55 74 69 6c 73 3b 0d 0a g.UnityEngine.TestTools.Utils;..
1200 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 #if.UNITY_EDITOR..using.UnityEng
1220 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 45 64 69 74 6f 72 3b 0d 0a 23 65 6e 64 69 66 0d ine.InputSystem.Editor;..#endif.
1240 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 6d 75 73 74 20 61 6c 6c 6f 77 20 72 75 6e 6e 69 6e 67 20 ...////TODO:.must.allow.running.
1260 55 6e 69 74 79 54 65 73 74 73 20 77 68 69 63 68 20 6d 65 61 6e 73 20 77 65 20 68 61 76 65 20 74 UnityTests.which.means.we.have.t
1280 6f 20 62 65 20 61 62 6c 65 20 74 6f 20 67 65 74 20 70 65 72 2d 66 72 61 6d 65 20 75 70 64 61 74 o.be.able.to.get.per-frame.updat
12a0 65 73 20 79 65 74 20 6e 6f 74 20 72 65 63 65 69 76 65 20 69 6e 70 75 74 20 66 72 6f 6d 20 6e 61 es.yet.not.receive.input.from.na
12c0 74 69 76 65 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 77 68 65 6e 20 72 75 6e 6e 69 6e 67 20 74 tive....////TODO:.when.running.t
12e0 65 73 74 73 20 69 6e 20 70 6c 61 79 65 72 73 2c 20 6d 61 6b 65 20 73 75 72 65 20 74 68 61 74 20 ests.in.players,.make.sure.that.
1300 72 65 6d 6f 74 69 6e 67 20 69 73 20 74 75 72 6e 65 64 20 6f 66 66 0d 0a 0d 0a 2f 2f 2f 2f 52 45 remoting.is.turned.off....////RE
1320 56 49 45 57 3a 20 61 6c 77 61 79 73 20 65 6e 61 62 6c 65 20 65 76 65 6e 74 20 64 69 61 67 6e 6f VIEW:.always.enable.event.diagno
1340 73 74 69 63 73 20 69 6e 20 49 6e 70 75 74 54 65 73 74 46 69 78 74 75 72 65 3f 0d 0a 0d 0a 6e 61 stics.in.InputTestFixture?....na
1360 6d 65 73 70 61 63 65 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 0d mespace.UnityEngine.InputSystem.
1380 0a 7b 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 41 .{......///.<summary>......///.A
13a0 20 74 65 73 74 20 66 69 78 74 75 72 65 20 66 6f 72 20 77 72 69 74 69 6e 67 20 74 65 73 74 73 20 .test.fixture.for.writing.tests.
13c0 74 68 61 74 20 75 73 65 20 74 68 65 20 69 6e 70 75 74 20 73 79 73 74 65 6d 2e 20 43 61 6e 20 62 that.use.the.input.system..Can.b
13e0 65 20 64 65 72 69 76 65 64 20 66 72 6f 6d 0d 0a 20 20 20 20 2f 2f 2f 20 6f 72 20 73 69 6d 70 6c e.derived.from......///.or.simpl
1400 79 20 69 6e 73 74 61 6e 74 69 61 74 65 64 20 66 72 6f 6d 20 61 6e 6f 74 68 65 72 20 74 65 73 74 y.instantiated.from.another.test
1420 20 66 69 78 74 75 72 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 .fixture.......///.</summary>...
1440 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 65 20 66 69 ...///.<remarks>......///.The.fi
1460 78 74 75 72 65 20 77 69 6c 6c 20 70 75 74 20 74 68 65 20 69 6e 70 75 74 20 73 79 73 74 65 6d 20 xture.will.put.the.input.system.
1480 69 6e 74 6f 20 61 20 6b 6e 6f 77 6e 20 73 74 61 74 65 20 77 68 65 72 65 20 69 74 20 68 61 73 20 into.a.known.state.where.it.has.
14a0 6f 6e 6c 79 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f 20 62 75 69 6c 74 2d 69 6e 20 73 65 74 20 6f only.the......///.built-in.set.o
14c0 66 20 62 61 73 69 63 20 6c 61 79 6f 75 74 73 20 61 6e 64 20 6e 6f 20 64 65 76 69 63 65 73 2e 20 f.basic.layouts.and.no.devices..
14e0 54 68 65 20 73 74 61 74 65 20 6f 66 20 74 68 65 20 73 79 73 74 65 6d 20 62 65 66 6f 72 65 0d 0a The.state.of.the.system.before..
1500 20 20 20 20 2f 2f 2f 20 73 74 61 72 74 69 6e 67 20 61 20 74 65 73 74 20 69 73 20 72 65 63 6f 72 ....///.starting.a.test.is.recor
1520 64 65 64 20 61 6e 64 20 72 65 73 74 6f 72 65 64 20 77 68 65 6e 20 74 68 65 20 74 65 73 74 20 66 ded.and.restored.when.the.test.f
1540 69 6e 69 73 68 65 73 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 3c 65 78 61 6d inishes.......///......///.<exam
1560 70 6c 65 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 63 6f 64 65 3e 0d 0a 20 20 20 20 2f 2f 2f 20 70 75 ple>......///.<code>......///.pu
1580 62 6c 69 63 20 63 6c 61 73 73 20 4d 79 49 6e 70 75 74 54 65 73 74 73 20 3a 20 49 6e 70 75 74 54 blic.class.MyInputTests.:.InputT
15a0 65 73 74 46 69 78 74 75 72 65 0d 0a 20 20 20 20 2f 2f 2f 20 7b 0d 0a 20 20 20 20 2f 2f 2f 20 20 estFixture......///.{......///..
15c0 20 20 20 70 75 62 6c 69 63 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 20 53 65 74 75 70 28 29 0d ...public.override.void.Setup().
15e0 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 7b 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 .....///.....{......///.........
1600 62 61 73 65 2e 53 65 74 75 70 28 29 3b 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 base.Setup();......///......///.
1620 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 52 65 67 69 73 74 65 72 4c 61 79 6f ........InputSystem.RegisterLayo
1640 75 74 26 6c 74 3b 4d 79 44 65 76 69 63 65 26 67 74 3b 28 29 3b 0d 0a 20 20 20 20 2f 2f 2f 20 20 ut&lt;MyDevice&gt;();......///..
1660 20 20 20 7d 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 5b 54 65 73 74 ...}......///......///.....[Test
1680 5d 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 43 61 6e 43 72 ]......///.....public.void.CanCr
16a0 65 61 74 65 4d 79 44 65 76 69 63 65 28 29 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 7b 0d 0a 20 eateMyDevice()......///.....{...
16c0 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 41 64 64 44 65 ...///.........InputSystem.AddDe
16e0 76 69 63 65 26 6c 74 3b 4d 79 44 65 76 69 63 65 26 67 74 3b 28 29 3b 0d 0a 20 20 20 20 2f 2f 2f vice&lt;MyDevice&gt;();......///
1700 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 54 68 61 74 28 49 6e 70 75 74 53 79 73 74 65 6d .........Assert.That(InputSystem
1720 2e 64 65 76 69 63 65 73 2c 20 48 61 73 2e 45 78 61 63 74 6c 79 28 31 29 2e 54 79 70 65 4f 66 26 .devices,.Has.Exactly(1).TypeOf&
1740 6c 74 3b 4d 79 44 65 76 69 63 65 26 67 74 3b 28 29 29 3b 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 lt;MyDevice&gt;());......///....
1760 20 7d 0d 0a 20 20 20 20 2f 2f 2f 20 7d 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a .}......///.}......///.</code>..
1780 20 20 20 20 2f 2f 2f 20 3c 2f 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 ....///.</example>......///.....
17a0 20 2f 2f 2f 20 54 68 65 20 74 65 73 74 20 66 69 78 74 75 72 65 20 77 69 6c 6c 20 61 6c 73 6f 20 .///.The.test.fixture.will.also.
17c0 73 65 76 65 72 20 74 68 65 20 74 69 65 20 6f 66 20 74 68 65 20 69 6e 70 75 74 20 73 79 73 74 65 sever.the.tie.of.the.input.syste
17e0 6d 20 74 6f 20 74 68 65 20 55 6e 69 74 79 20 72 75 6e 74 69 6d 65 2e 0d 0a 20 20 20 20 2f 2f 2f m.to.the.Unity.runtime.......///
1800 20 54 68 69 73 20 6d 65 61 6e 73 20 74 68 61 74 20 77 68 69 6c 65 20 74 68 65 20 74 65 73 74 20 .This.means.that.while.the.test.
1820 66 69 78 74 75 72 65 20 69 73 20 61 63 74 69 76 65 2c 20 74 68 65 20 69 6e 70 75 74 20 73 79 73 fixture.is.active,.the.input.sys
1840 74 65 6d 20 77 69 6c 6c 20 6e 6f 74 20 72 65 63 65 69 76 65 0d 0a 20 20 20 20 2f 2f 2f 20 69 6e tem.will.not.receive......///.in
1860 70 75 74 20 61 6e 64 20 64 65 76 69 63 65 20 64 69 73 63 6f 76 65 72 79 20 6f 72 20 72 65 6d 6f put.and.device.discovery.or.remo
1880 76 61 6c 20 6e 6f 74 69 66 69 63 61 74 69 6f 6e 73 20 66 72 6f 6d 20 70 6c 61 74 66 6f 72 6d 20 val.notifications.from.platform.
18a0 63 6f 64 65 2e 20 54 68 69 73 20 65 6e 73 75 72 65 73 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 61 74 code..This.ensures......///.that
18c0 20 77 68 69 6c 65 20 74 68 65 20 74 65 73 74 20 69 73 20 72 75 6e 6e 69 6e 67 2c 20 69 6e 70 75 .while.the.test.is.running,.inpu
18e0 74 20 74 68 61 74 20 6d 61 79 20 62 65 20 67 65 6e 65 72 61 74 65 64 20 6f 6e 20 74 68 65 20 6d t.that.may.be.generated.on.the.m
1900 61 63 68 69 6e 65 20 72 75 6e 6e 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 65 20 74 65 73 74 achine.running......///.the.test
1920 20 77 69 6c 6c 20 6e 6f 74 20 69 6e 66 65 72 20 77 69 74 68 20 69 74 2e 0d 0a 20 20 20 20 2f 2f .will.not.infer.with.it.......//
1940 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6c 61 73 73 20 49 /.</remarks>......public.class.I
1960 6e 70 75 74 54 65 73 74 46 69 78 74 75 72 65 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 nputTestFixture......{..........
1980 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 50 75 74 20 3c ///.<summary>..........///.Put.<
19a0 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 53 79 73 74 65 6d 22 2f 3e 20 69 6e 74 6f 20 61 20 see.cref="InputSystem"/>.into.a.
19c0 6b 6e 6f 77 6e 20 73 74 61 74 65 20 77 68 65 72 65 20 69 74 20 6f 6e 6c 79 20 68 61 73 20 61 20 known.state.where.it.only.has.a.
19e0 62 61 73 69 63 20 73 65 74 20 6f 66 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6c 61 79 6f 75 74 basic.set.of..........///.layout
1a00 73 20 61 6e 64 20 64 6f 65 73 20 6e 6f 74 20 68 61 76 65 20 61 6e 79 20 69 6e 70 75 74 20 64 65 s.and.does.not.have.any.input.de
1a20 76 69 63 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a vices...........///.</summary>..
1a40 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f ........///.<remarks>........../
1a60 2f 2f 20 49 66 20 79 6f 75 20 64 65 72 69 76 65 20 79 6f 75 72 20 6f 77 6e 20 74 65 73 74 20 66 //.If.you.derive.your.own.test.f
1a80 69 78 74 75 72 65 20 64 69 72 65 63 74 6c 79 20 66 72 6f 6d 20 49 6e 70 75 74 54 65 73 74 46 69 ixture.directly.from.InputTestFi
1aa0 78 74 75 72 65 2c 20 74 68 69 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6d 65 74 68 6f 64 20 xture,.this..........///.method.
1ac0 77 69 6c 6c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 62 65 20 63 61 6c 6c 65 64 2e 20 49 66 will.automatically.be.called..If
1ae0 20 79 6f 75 20 65 6d 62 65 64 20 49 6e 70 75 74 54 65 73 74 46 69 78 74 75 72 65 20 69 6e 74 6f .you.embed.InputTestFixture.into
1b00 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 79 6f 75 72 20 66 69 78 74 75 72 65 2c 20 79 6f 75 20 ..........///.your.fixture,.you.
1b20 68 61 76 65 20 74 6f 20 65 78 70 6c 69 63 69 74 6c 79 20 63 61 6c 6c 20 74 68 69 73 20 6d 65 74 have.to.explicitly.call.this.met
1b40 68 6f 64 20 79 6f 75 72 73 65 6c 66 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d hod.yourself...........///.</rem
1b60 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 arks>..........///.<seealso.cref
1b80 3d 22 54 65 61 72 44 6f 77 6e 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 74 55 70 5d 0d 0a ="TearDown"/>..........[SetUp]..
1ba0 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 69 72 74 75 61 6c 20 76 6f 69 64 20 53 65 74 75 ........public.virtual.void.Setu
1bc0 70 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 72 79 0d p()..........{..............try.
1be0 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............{..................
1c00 2f 2f 20 41 70 70 61 72 65 6e 74 6c 79 2c 20 4e 55 6e 69 74 20 69 73 20 72 65 75 73 69 6e 67 20 //.Apparently,.NUnit.is.reusing.
1c20 69 6e 73 74 61 6e 63 65 73 20 3a 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f instances.:(..................m_
1c40 4b 65 79 49 6e 66 6f 73 20 3d 20 64 65 66 61 75 6c 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 KeyInfos.=.default;.............
1c60 20 20 20 20 20 20 20 2f 2f 20 44 69 73 61 62 6c 65 20 69 6e 70 75 74 20 64 65 62 75 67 67 65 72 .......//.Disable.input.debugger
1c80 20 73 6f 20 77 65 20 64 6f 6e 27 74 20 77 61 73 74 65 20 74 69 6d 65 20 72 65 73 70 6f 6e 64 69 .so.we.don't.waste.time.respondi
1ca0 6e 67 20 74 6f 20 61 6c 6c 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f ng.to.all.the................../
1cc0 2f 20 69 6e 70 75 74 20 73 79 73 74 65 6d 20 61 63 74 69 76 69 74 79 20 66 72 6f 6d 20 74 68 65 /.input.system.activity.from.the
1ce0 20 74 65 73 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 .tests...................#if.UNI
1d00 54 59 5f 45 44 49 54 4f 52 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 TY_EDITOR..................Input
1d20 44 65 62 75 67 67 65 72 57 69 6e 64 6f 77 2e 44 69 73 61 62 6c 65 28 29 3b 0d 0a 20 20 20 20 20 DebuggerWindow.Disable();.......
1d40 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 69 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ...........#endif...............
1d60 20 20 20 20 20 72 75 6e 74 69 6d 65 20 3d 20 6e 65 77 20 49 6e 70 75 74 54 65 73 74 52 75 6e 74 .....runtime.=.new.InputTestRunt
1d80 69 6d 65 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 75 73 ime();....................//.Pus
1da0 68 20 63 75 72 72 65 6e 74 20 69 6e 70 75 74 20 73 79 73 74 65 6d 20 73 74 61 74 65 20 6f 6e 20 h.current.input.system.state.on.
1dc0 73 74 61 63 6b 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 stack...................InputSys
1de0 74 65 6d 2e 53 61 76 65 41 6e 64 52 65 73 65 74 28 65 6e 61 62 6c 65 52 65 6d 6f 74 69 6e 67 3a tem.SaveAndReset(enableRemoting:
1e00 20 66 61 6c 73 65 2c 20 72 75 6e 74 69 6d 65 3a 20 72 75 6e 74 69 6d 65 29 3b 0d 0a 0d 0a 20 20 .false,.runtime:.runtime);......
1e20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0d 0a ..............#if.UNITY_EDITOR..
1e40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 61 6b 65 20 73 75 72 65 20 77 65 27 ................//.Make.sure.we'
1e60 72 65 20 6e 6f 74 20 61 66 66 65 63 74 65 64 20 62 79 20 74 68 65 20 75 73 65 72 20 67 69 76 69 re.not.affected.by.the.user.givi
1e80 6e 67 20 66 6f 63 75 73 20 61 77 61 79 20 66 72 6f 6d 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 ng.focus.away.from.the..........
1ea0 20 20 20 20 20 20 20 20 2f 2f 20 67 61 6d 65 20 76 69 65 77 2e 0d 0a 20 20 20 20 20 20 20 20 20 ........//.game.view............
1ec0 20 20 20 20 20 20 20 49 6e 70 75 74 45 64 69 74 6f 72 55 73 65 72 53 65 74 74 69 6e 67 73 2e 6c .......InputEditorUserSettings.l
1ee0 6f 63 6b 49 6e 70 75 74 54 6f 47 61 6d 65 56 69 65 77 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 ockInputToGameView.=.true;......
1f00 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 69 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 ............#endif..............
1f20 20 20 20 20 20 20 2f 2f 20 57 65 20 75 73 65 20 6e 61 74 69 76 65 20 63 6f 6c 6c 65 63 74 69 6f ......//.We.use.native.collectio
1f40 6e 73 20 69 6e 20 61 20 63 6f 75 70 6c 65 20 70 6c 61 63 65 73 2e 20 57 65 20 77 68 65 6e 20 6c ns.in.a.couple.places..We.when.l
1f60 65 61 6b 20 74 68 65 6d 2c 20 77 65 20 77 61 6e 74 20 74 6f 20 6b 6e 6f 77 20 77 68 65 72 65 20 eak.them,.we.want.to.know.where.
1f80 65 78 61 63 74 6c 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 74 68 65 20 exactly..................//.the.
1fa0 61 6c 6c 6f 63 61 74 69 6f 6e 20 63 61 6d 65 20 66 72 6f 6d 20 73 6f 20 65 6e 61 62 6c 65 20 66 allocation.came.from.so.enable.f
1fc0 75 6c 6c 20 6c 65 61 6b 20 64 65 74 65 63 74 69 6f 6e 20 69 6e 20 74 65 73 74 73 2e 0d 0a 20 20 ull.leak.detection.in.tests.....
1fe0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4e 61 74 69 76 65 4c 65 61 6b 44 65 74 65 63 74 69 6f ..............NativeLeakDetectio
2000 6e 2e 4d 6f 64 65 20 3d 20 4e 61 74 69 76 65 4c 65 61 6b 44 65 74 65 63 74 69 6f 6e 4d 6f 64 65 n.Mode.=.NativeLeakDetectionMode
2020 2e 45 6e 61 62 6c 65 64 57 69 74 68 53 74 61 63 6b 54 72 61 63 65 3b 0d 0a 20 20 20 20 20 20 20 .EnabledWithStackTrace;.........
2040 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 63 61 74 63 68 20 28 45 78 63 65 70 .....}..............catch.(Excep
2060 74 69 6f 6e 20 65 78 63 65 70 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a tion.exception)..............{..
2080 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 45 72 72 6f 72 28 22 ................Debug.LogError("
20a0 46 61 69 6c 65 64 20 74 6f 20 73 65 74 20 75 70 20 69 6e 70 75 74 20 73 79 73 74 65 6d 20 66 6f Failed.to.set.up.input.system.fo
20c0 72 20 74 65 73 74 20 22 20 2b 20 54 65 73 74 43 6f 6e 74 65 78 74 2e 43 75 72 72 65 6e 74 43 6f r.test.".+.TestContext.CurrentCo
20e0 6e 74 65 78 74 2e 54 65 73 74 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ntext.Test.Name);...............
2100 20 20 20 44 65 62 75 67 2e 4c 6f 67 45 78 63 65 70 74 69 6f 6e 28 65 78 63 65 70 74 69 6f 6e 29 ...Debug.LogException(exception)
2120 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 3b 0d 0a 20 20 20 20 20 ;..................throw;.......
2140 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 49 6e 70 75 .......}................if.(Inpu
2160 74 53 79 73 74 65 6d 2e 64 65 76 69 63 65 73 2e 43 6f 75 6e 74 20 3e 20 30 29 0d 0a 20 20 20 20 tSystem.devices.Count.>.0)......
2180 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 46 61 69 6c 28 22 49 6e 70 75 74 20 73 ............Assert.Fail("Input.s
21a0 79 73 74 65 6d 20 73 68 6f 75 6c 64 20 6e 6f 74 20 68 61 76 65 20 64 65 76 69 63 65 73 20 61 66 ystem.should.not.have.devices.af
21c0 74 65 72 20 72 65 73 65 74 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 ter.reset");..........}.........
21e0 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 52 65 ...///.<summary>..........///.Re
2200 73 74 6f 72 65 20 74 68 65 20 73 74 61 74 65 20 6f 66 20 74 68 65 20 69 6e 70 75 74 20 73 79 73 store.the.state.of.the.input.sys
2220 74 65 6d 20 69 74 20 68 61 64 20 77 68 65 6e 20 74 68 65 20 74 65 73 74 20 77 61 73 20 73 74 61 tem.it.had.when.the.test.was.sta
2240 72 74 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 rted...........///.</summary>...
2260 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 53 65 74 75 70 22 .......///.<seealso.cref="Setup"
2280 2f 3e 0d 0a 20 20 20 20 20 20 20 20 5b 54 65 61 72 44 6f 77 6e 5d 0d 0a 20 20 20 20 20 20 20 20 />..........[TearDown]..........
22a0 70 75 62 6c 69 63 20 76 69 72 74 75 61 6c 20 76 6f 69 64 20 54 65 61 72 44 6f 77 6e 28 29 0d 0a public.virtual.void.TearDown()..
22c0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 72 79 0d 0a 20 20 20 20 ........{..............try......
22e0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 ........{..................//.De
2300 73 74 72 6f 79 20 61 6e 79 20 47 61 6d 65 4f 62 6a 65 63 74 20 69 6e 20 74 68 65 20 63 75 72 72 stroy.any.GameObject.in.the.curr
2320 65 6e 74 20 73 63 65 6e 65 20 74 68 61 74 20 69 73 6e 27 74 20 68 69 64 64 65 6e 20 61 6e 64 20 ent.scene.that.isn't.hidden.and.
2340 69 73 6e 27 74 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 74 65 isn't.the..................//.te
2360 73 74 20 72 75 6e 6e 65 72 20 6f 62 6a 65 63 74 2e 20 44 6f 20 74 68 69 73 20 66 69 72 73 74 20 st.runner.object..Do.this.first.
2380 73 6f 20 74 68 61 74 20 61 6e 79 20 63 6c 65 61 6e 75 70 20 66 69 6e 64 73 20 74 68 65 20 73 79 so.that.any.cleanup.finds.the.sy
23a0 73 74 65 6d 20 69 6e 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 stem.in.the..................//.
23c0 73 74 61 74 65 20 69 74 20 65 78 70 65 63 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 state.it.expects................
23e0 20 20 20 76 61 72 20 73 63 65 6e 65 20 3d 20 53 63 65 6e 65 4d 61 6e 61 67 65 72 2e 47 65 74 41 ...var.scene.=.SceneManager.GetA
2400 63 74 69 76 65 53 63 65 6e 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 ctiveScene();..................f
2420 6f 72 65 61 63 68 20 28 76 61 72 20 67 6f 20 69 6e 20 73 63 65 6e 65 2e 47 65 74 52 6f 6f 74 47 oreach.(var.go.in.scene.GetRootG
2440 61 6d 65 4f 62 6a 65 63 74 73 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b ameObjects())..................{
2460 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 67 6f 2e 68 69 64 ......................if.(go.hid
2480 65 46 6c 61 67 73 20 21 3d 20 30 20 7c 7c 20 67 6f 2e 6e 61 6d 65 2e 43 6f 6e 74 61 69 6e 73 28 eFlags.!=.0.||.go.name.Contains(
24a0 22 74 65 73 74 73 20 72 75 6e 6e 65 72 22 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 "tests.runner"))................
24c0 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..........continue;.............
24e0 20 20 20 20 20 20 20 20 20 4f 62 6a 65 63 74 2e 44 65 73 74 72 6f 79 49 6d 6d 65 64 69 61 74 65 .........Object.DestroyImmediate
2500 28 67 6f 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 (go);..................}........
2520 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 52 65 73 74 6f 72 65 28 ............InputSystem.Restore(
2540 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 75 6e 74 69 6d 65 2e 44 69 73 70 );..................runtime.Disp
2560 6f 73 65 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 2d ose();....................//.Re-
2580 65 6e 61 62 6c 65 20 69 6e 70 75 74 20 64 65 62 75 67 67 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 enable.input.debugger...........
25a0 20 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0d 0a 20 20 20 20 20 20 ........#if.UNITY_EDITOR........
25c0 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 44 65 62 75 67 67 65 72 57 69 6e 64 6f 77 2e 45 6e ..........InputDebuggerWindow.En
25e0 61 62 6c 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 23 65 6e 64 69 66 0d able();..................#endif.
2600 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 63 61 74 63 .............}..............catc
2620 68 20 28 45 78 63 65 70 74 69 6f 6e 20 65 78 63 65 70 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 h.(Exception.exception).........
2640 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 4c 6f .....{..................Debug.Lo
2660 67 45 72 72 6f 72 28 22 46 61 69 6c 65 64 20 74 6f 20 73 68 75 74 20 64 6f 77 6e 20 61 6e 64 20 gError("Failed.to.shut.down.and.
2680 72 65 73 74 6f 72 65 20 69 6e 70 75 74 20 73 79 73 74 65 6d 20 61 66 74 65 72 20 74 65 73 74 20 restore.input.system.after.test.
26a0 22 20 2b 20 54 65 73 74 43 6f 6e 74 65 78 74 2e 43 75 72 72 65 6e 74 43 6f 6e 74 65 78 74 2e 54 ".+.TestContext.CurrentContext.T
26c0 65 73 74 2e 4e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 est.Name);..................Debu
26e0 67 2e 4c 6f 67 45 78 63 65 70 74 69 6f 6e 28 65 78 63 65 70 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 g.LogException(exception);......
2700 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ............throw;..............
2720 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 52 65 53 68 61 }..........}............//.ReSha
2740 72 70 65 72 20 64 69 73 61 62 6c 65 20 6f 6e 63 65 20 4d 65 6d 62 65 72 43 61 6e 42 65 50 72 6f rper.disable.once.MemberCanBePro
2760 74 65 63 74 65 64 2e 47 6c 6f 62 61 6c 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 tected.Global..........public.st
2780 61 74 69 63 20 76 6f 69 64 20 41 73 73 65 72 74 42 75 74 74 6f 6e 50 72 65 73 73 3c 54 53 74 61 atic.void.AssertButtonPress<TSta
27a0 74 65 3e 28 49 6e 70 75 74 44 65 76 69 63 65 20 64 65 76 69 63 65 2c 20 54 53 74 61 74 65 20 73 te>(InputDevice.device,.TState.s
27c0 74 61 74 65 2c 20 70 61 72 61 6d 73 20 42 75 74 74 6f 6e 43 6f 6e 74 72 6f 6c 5b 5d 20 62 75 74 tate,.params.ButtonControl[].but
27e0 74 6f 6e 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 65 72 65 20 54 53 74 61 74 65 20 tons)..............where.TState.
2800 3a 20 73 74 72 75 63 74 2c 20 49 49 6e 70 75 74 53 74 61 74 65 54 79 70 65 49 6e 66 6f 0d 0a 20 :.struct,.IInputStateTypeInfo...
2820 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 55 70 64 61 74 65 20 .......{..............//.Update.
2840 73 74 61 74 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e state...............InputSystem.
2860 51 75 65 75 65 53 74 61 74 65 45 76 65 6e 74 28 64 65 76 69 63 65 2c 20 73 74 61 74 65 29 3b 0d QueueStateEvent(device,.state);.
2880 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 55 70 64 61 74 65 28 .............InputSystem.Update(
28a0 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 6f 77 20 76 65 72 69 66 79 20 );................//.Now.verify.
28c0 74 68 61 74 20 6f 6e 6c 79 20 74 68 65 20 62 75 74 74 6f 6e 73 20 77 65 20 65 78 70 65 63 74 20 that.only.the.buttons.we.expect.
28e0 74 6f 20 62 65 20 70 72 65 73 73 65 64 20 61 72 65 20 70 72 65 73 73 65 64 2e 0d 0a 20 20 20 20 to.be.pressed.are.pressed.......
2900 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 63 6f 6e 74 72 6f 6c 20 69 6e 20 ........foreach.(var.control.in.
2920 64 65 76 69 63 65 2e 61 6c 6c 43 6f 6e 74 72 6f 6c 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 device.allControls).............
2940 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 28 63 6f 6e 74 72 6f .{..................if.(!(contro
2960 6c 20 69 73 20 42 75 74 74 6f 6e 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 72 6f 6c 41 73 42 75 74 74 l.is.ButtonControl.controlAsButt
2980 6f 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e on))......................contin
29a0 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 73 49 6e 4c ue;....................var.isInL
29c0 69 73 74 20 3d 20 62 75 74 74 6f 6e 73 2e 43 6f 6e 74 61 69 6e 73 28 63 6f 6e 74 72 6f 6c 41 73 ist.=.buttons.Contains(controlAs
29e0 42 75 74 74 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 69 Button);..................if.(!i
2a00 73 49 6e 4c 69 73 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 73 sInList)......................As
2a20 73 65 72 74 2e 54 68 61 74 28 63 6f 6e 74 72 6f 6c 41 73 42 75 74 74 6f 6e 2e 69 73 50 72 65 73 sert.That(controlAsButton.isPres
2a40 73 65 64 2c 20 49 73 2e 46 61 6c 73 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 sed,.Is.False,..................
2a60 20 20 20 20 20 20 20 20 24 22 45 78 70 65 63 74 65 64 20 62 75 74 74 6f 6e 20 7b 63 6f 6e 74 72 ........$"Expected.button.{contr
2a80 6f 6c 41 73 42 75 74 74 6f 6e 7d 20 74 6f 20 4e 4f 54 20 62 65 20 70 72 65 73 73 65 64 22 29 3b olAsButton}.to.NOT.be.pressed");
2aa0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 ..................else..........
2ac0 20 20 20 20 20 20 20 20 20 20 20 20 41 73 73 65 72 74 2e 54 68 61 74 28 63 6f 6e 74 72 6f 6c 41 ............Assert.That(controlA
2ae0 73 42 75 74 74 6f 6e 2e 69 73 50 72 65 73 73 65 64 2c 20 49 73 2e 54 72 75 65 2c 0d 0a 20 20 20 sButton.isPressed,.Is.True,.....
2b00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 22 45 78 70 65 63 74 65 64 20 .....................$"Expected.
2b20 62 75 74 74 6f 6e 20 7b 63 6f 6e 74 72 6f 6c 41 73 42 75 74 74 6f 6e 7d 20 74 6f 20 62 65 20 70 button.{controlAsButton}.to.be.p
2b40 72 65 73 73 65 64 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 ressed");..............}........
2b60 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 44 69 63 74 69 6f 6e 61 72 ..}............private.Dictionar
2b80 79 3c 4b 65 79 2c 20 54 75 70 6c 65 3c 73 74 72 69 6e 67 2c 20 69 6e 74 3e 3e 20 6d 5f 4b 65 79 y<Key,.Tuple<string,.int>>.m_Key
2ba0 49 6e 66 6f 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d Infos;............///.<summary>.
2bc0 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 65 74 20 3c 73 65 65 20 63 72 65 66 3d 22 4b 65 79 62 .........///.Set.<see.cref="Keyb
2be0 6f 61 72 64 2e 6b 65 79 62 6f 61 72 64 4c 61 79 6f 75 74 22 2f 3e 20 6f 66 20 74 68 65 20 67 69 oard.keyboardLayout"/>.of.the.gi
2c00 76 65 6e 20 6b 65 79 62 6f 61 72 64 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d ven.keyboard...........///.</sum
2c20 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 mary>..........///.<param.name="
2c40 6e 61 6d 65 22 3e 4e 61 6d 65 20 6f 66 20 74 68 65 20 6b 65 79 62 6f 61 72 64 20 6c 61 79 6f 75 name">Name.of.the.keyboard.layou
2c60 74 20 74 6f 20 73 77 69 74 63 68 20 74 6f 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 t.to.switch.to.</param>.........
2c80 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6b 65 79 62 6f 61 72 64 22 3e 4b 65 79 62 .///.<param.name="keyboard">Keyb
2ca0 6f 61 72 64 20 74 6f 20 73 77 69 74 63 68 20 6c 61 79 6f 75 74 20 6f 6e 2e 20 49 66 20 3c 63 3e oard.to.switch.layout.on..If.<c>
2cc0 6e 75 6c 6c 3c 2f 63 3e 2c 20 3c 73 65 65 20 63 72 65 66 3d 22 4b 65 79 62 6f 61 72 64 2e 63 75 null</c>,.<see.cref="Keyboard.cu
2ce0 72 72 65 6e 74 22 2f 3e 20 69 73 20 75 73 65 64 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 rrent"/>.is.used.</param>.......
2d00 20 20 20 2f 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 ...///.<exception.cref="Argument
2d20 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 6b 65 79 62 6f Exception"><paramref.name="keybo
2d40 61 72 64 22 2f 3e 20 61 6e 64 20 3c 73 65 65 20 63 72 65 66 3d 22 4b 65 79 62 6f 61 72 64 2e 63 ard"/>.and.<see.cref="Keyboard.c
2d60 75 72 72 65 6e 74 22 2f 3e 20 61 72 65 20 62 6f 74 68 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e 3c urrent"/>.are.both.<c>null</c>.<
2d80 2f 65 78 63 65 70 74 69 6f 6e 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b /exception>..........///.<remark
2da0 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 6c 73 6f 20 71 75 65 75 65 73 20 61 6e 64 20 s>..........///.Also.queues.and.
2dc0 69 6d 6d 65 64 69 61 74 65 6c 79 20 70 72 6f 63 65 73 73 65 73 20 61 6e 20 3c 73 65 65 20 63 72 immediately.processes.an.<see.cr
2de0 65 66 3d 22 44 65 76 69 63 65 43 6f 6e 66 69 67 75 72 61 74 69 6f 6e 45 76 65 6e 74 22 2f 3e 20 ef="DeviceConfigurationEvent"/>.
2e00 66 6f 72 20 74 68 65 20 6b 65 79 62 6f 61 72 64 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c for.the.keyboard...........///.<
2e20 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 75 6e 73 61 66 65 /remarks>..........public.unsafe
2e40 20 76 6f 69 64 20 53 65 74 4b 65 79 62 6f 61 72 64 4c 61 79 6f 75 74 28 73 74 72 69 6e 67 20 6e .void.SetKeyboardLayout(string.n
2e60 61 6d 65 2c 20 4b 65 79 62 6f 61 72 64 20 6b 65 79 62 6f 61 72 64 20 3d 20 6e 75 6c 6c 29 0d 0a ame,.Keyboard.keyboard.=.null)..
2e80 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6b 65 79 62 6f ........{..............if.(keybo
2ea0 61 72 64 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 ard.==.null)..............{.....
2ec0 20 20 20 20 20 20 20 20 20 20 20 20 20 6b 65 79 62 6f 61 72 64 20 3d 20 4b 65 79 62 6f 61 72 64 .............keyboard.=.Keyboard
2ee0 2e 63 75 72 72 65 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6b .current;..................if.(k
2f00 65 79 62 6f 61 72 64 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 eyboard.==.null)................
2f20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f ......throw.new.ArgumentExceptio
2f40 6e 28 22 4e 6f 20 6b 65 79 62 6f 61 72 64 20 68 61 73 20 62 65 65 6e 20 63 72 65 61 74 65 64 20 n("No.keyboard.has.been.created.
2f60 61 6e 64 20 6e 6f 20 6b 65 79 62 6f 61 72 64 20 68 61 73 20 62 65 65 6e 20 67 69 76 65 6e 22 2c and.no.keyboard.has.been.given",
2f80 20 6e 61 6d 65 6f 66 28 6b 65 79 62 6f 61 72 64 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .nameof(keyboard));.............
2fa0 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 75 6e 74 69 6d 65 2e 53 65 74 44 65 76 .}................runtime.SetDev
2fc0 69 63 65 43 6f 6d 6d 61 6e 64 43 61 6c 6c 62 61 63 6b 28 6b 65 79 62 6f 61 72 64 2c 20 28 69 64 iceCommandCallback(keyboard,.(id
2fe0 2c 20 63 6f 6d 6d 61 6e 64 29 20 3d 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 ,.command).=>..............{....
3000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 64 20 3d 3d 20 51 75 65 72 79 4b 65 79 ..............if.(id.==.QueryKey
3020 62 6f 61 72 64 4c 61 79 6f 75 74 43 6f 6d 6d 61 6e 64 2e 54 79 70 65 29 0d 0a 20 20 20 20 20 20 boardLayoutCommand.Type)........
3040 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........{.....................
3060 20 76 61 72 20 63 6f 6d 6d 61 6e 64 50 74 72 20 3d 20 28 51 75 65 72 79 4b 65 79 62 6f 61 72 64 .var.commandPtr.=.(QueryKeyboard
3080 4c 61 79 6f 75 74 43 6f 6d 6d 61 6e 64 2a 29 63 6f 6d 6d 61 6e 64 3b 0d 0a 20 20 20 20 20 20 20 LayoutCommand*)command;.........
30a0 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6d 6d 61 6e 64 50 74 72 2d 3e 57 72 69 74 65 4c 61 .............commandPtr->WriteLa
30c0 79 6f 75 74 4e 61 6d 65 28 6e 61 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 youtName(name);.................
30e0 20 20 20 20 20 72 65 74 75 72 6e 20 49 6e 70 75 74 44 65 76 69 63 65 43 6f 6d 6d 61 6e 64 2e 47 .....return.InputDeviceCommand.G
3100 65 6e 65 72 69 63 53 75 63 63 65 73 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 enericSuccess;..................
3120 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 49 6e 70 75 74 44 }..................return.InputD
3140 65 76 69 63 65 43 6f 6d 6d 61 6e 64 2e 47 65 6e 65 72 69 63 46 61 69 6c 75 72 65 3b 0d 0a 20 20 eviceCommand.GenericFailure;....
3160 20 20 20 20 20 20 20 20 20 20 7d 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 ..........});................//.
3180 4d 61 6b 65 20 73 75 72 65 20 63 61 63 68 65 73 20 6f 6e 20 6b 65 79 73 20 61 72 65 20 66 6c 75 Make.sure.caches.on.keys.are.flu
31a0 73 68 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 51 shed...............InputSystem.Q
31c0 75 65 75 65 43 6f 6e 66 69 67 43 68 61 6e 67 65 45 76 65 6e 74 28 4b 65 79 62 6f 61 72 64 2e 63 ueueConfigChangeEvent(Keyboard.c
31e0 75 72 72 65 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 urrent);..............InputSyste
3200 6d 2e 55 70 64 61 74 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 m.Update();..........}..........
3220 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 65 74 ..///.<summary>..........///.Set
3240 20 74 68 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2e 64 69 73 .the.<see.cref="InputControl.dis
3260 70 6c 61 79 4e 61 6d 65 22 2f 3e 20 6f 66 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 6b playName"/>.of.<paramref.name="k
3280 65 79 22 2f 3e 20 6f 6e 20 74 68 65 20 63 75 72 72 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f ey"/>.on.the.current..........//
32a0 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 4b 65 79 62 6f 61 72 64 22 2f 3e 20 74 6f 20 62 65 20 3c /.<see.cref="Keyboard"/>.to.be.<
32c0 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 64 69 73 70 6c 61 79 4e 61 6d 65 22 2f 3e 2e 0d 0a paramref.name="displayName"/>...
32e0 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 ........///.</summary>..........
3300 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 6b 65 79 22 3e 4b 65 79 20 74 6f 20 73 65 74 ///.<param.name="key">Key.to.set
3320 20 74 68 65 20 64 69 73 70 6c 61 79 20 6e 61 6d 65 20 66 6f 72 2e 3c 2f 70 61 72 61 6d 3e 0d 0a .the.display.name.for.</param>..
3340 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 64 69 73 70 6c 61 79 ........///.<param.name="display
3360 4e 61 6d 65 22 3e 44 69 73 70 6c 61 79 20 6e 61 6d 65 20 66 6f 72 20 74 68 65 20 6b 65 79 2e 3c Name">Display.name.for.the.key.<
3380 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 /param>..........///.<param.name
33a0 3d 22 73 63 61 6e 43 6f 64 65 22 3e 4f 70 74 69 6f 6e 61 6c 20 3c 73 65 65 20 63 72 65 66 3d 22 ="scanCode">Optional.<see.cref="
33c0 4b 65 79 43 6f 6e 74 72 6f 6c 2e 73 63 61 6e 43 6f 64 65 22 2f 3e 20 74 6f 20 72 65 70 6f 72 74 KeyControl.scanCode"/>.to.report
33e0 20 66 6f 72 20 74 68 65 20 6b 65 79 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f .for.the.key.</param>........../
3400 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 75 74 6f 6d 61 //.<remarks>..........///.Automa
3420 74 69 63 61 6c 6c 79 20 61 64 64 73 20 61 20 3c 73 65 65 20 63 72 65 66 3d 22 4b 65 79 62 6f 61 tically.adds.a.<see.cref="Keyboa
3440 72 64 22 2f 3e 20 69 66 20 6e 6f 6e 65 20 68 61 73 20 62 65 65 6e 20 61 64 64 65 64 20 79 65 74 rd"/>.if.none.has.been.added.yet
3460 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 ...........///.</remarks>.......
3480 20 20 20 70 75 62 6c 69 63 20 75 6e 73 61 66 65 20 76 6f 69 64 20 53 65 74 4b 65 79 49 6e 66 6f ...public.unsafe.void.SetKeyInfo
34a0 28 4b 65 79 20 6b 65 79 2c 20 73 74 72 69 6e 67 20 64 69 73 70 6c 61 79 4e 61 6d 65 2c 20 69 6e (Key.key,.string.displayName,.in
34c0 74 20 73 63 61 6e 43 6f 64 65 20 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 t.scanCode.=.0)..........{......
34e0 20 20 20 20 20 20 20 20 69 66 20 28 4b 65 79 62 6f 61 72 64 2e 63 75 72 72 65 6e 74 20 3d 3d 20 ........if.(Keyboard.current.==.
3500 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 null)..................InputSyst
3520 65 6d 2e 41 64 64 44 65 76 69 63 65 3c 4b 65 79 62 6f 61 72 64 3e 28 29 3b 0d 0a 0d 0a 20 20 20 em.AddDevice<Keyboard>();.......
3540 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 4b 65 79 49 6e 66 6f 73 20 3d 3d 20 6e 75 6c 6c 29 .........if.(m_KeyInfos.==.null)
3560 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............{.................
3580 20 6d 5f 4b 65 79 49 6e 66 6f 73 20 3d 20 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 4b 65 79 .m_KeyInfos.=.new.Dictionary<Key
35a0 2c 20 54 75 70 6c 65 3c 73 74 72 69 6e 67 2c 20 69 6e 74 3e 3e 28 29 3b 0d 0a 0d 0a 20 20 20 20 ,.Tuple<string,.int>>();........
35c0 20 20 20 20 20 20 20 20 20 20 20 20 72 75 6e 74 69 6d 65 2e 53 65 74 44 65 76 69 63 65 43 6f 6d ............runtime.SetDeviceCom
35e0 6d 61 6e 64 43 61 6c 6c 62 61 63 6b 28 4b 65 79 62 6f 61 72 64 2e 63 75 72 72 65 6e 74 2c 0d 0a mandCallback(Keyboard.current,..
3600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 69 64 2c 20 63 6f 6d 6d 61 6e 64 ....................(id,.command
3620 50 74 72 29 20 3d 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a Ptr).=>......................{..
3640 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6d 6d ........................if.(comm
3660 61 6e 64 50 74 72 2d 3e 74 79 70 65 20 3d 3d 20 51 75 65 72 79 4b 65 79 4e 61 6d 65 43 6f 6d 6d andPtr->type.==.QueryKeyNameComm
3680 61 6e 64 2e 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 and.Type).......................
36a0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...{............................
36c0 20 20 76 61 72 20 6b 65 79 4e 61 6d 65 43 6f 6d 6d 61 6e 64 20 3d 20 28 51 75 65 72 79 4b 65 79 ..var.keyNameCommand.=.(QueryKey
36e0 4e 61 6d 65 43 6f 6d 6d 61 6e 64 2a 29 63 6f 6d 6d 61 6e 64 50 74 72 3b 0d 0a 0d 0a 20 20 20 20 NameCommand*)commandPtr;........
3700 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 4b 65 ........................if.(m_Ke
3720 79 49 6e 66 6f 73 2e 54 72 79 47 65 74 56 61 6c 75 65 28 28 4b 65 79 29 6b 65 79 4e 61 6d 65 43 yInfos.TryGetValue((Key)keyNameC
3740 6f 6d 6d 61 6e 64 2d 3e 73 63 61 6e 4f 72 4b 65 79 43 6f 64 65 2c 20 6f 75 74 20 76 61 72 20 69 ommand->scanOrKeyCode,.out.var.i
3760 6e 66 6f 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 nfo))...........................
3780 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...{............................
37a0 20 20 20 20 20 20 6b 65 79 4e 61 6d 65 43 6f 6d 6d 61 6e 64 2d 3e 73 63 61 6e 4f 72 4b 65 79 43 ......keyNameCommand->scanOrKeyC
37c0 6f 64 65 20 3d 20 69 6e 66 6f 2e 49 74 65 6d 32 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ode.=.info.Item2;...............
37e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 74 72 69 6e 67 48 65 6c 70 65 72 73 ...................StringHelpers
3800 2e 57 72 69 74 65 53 74 72 69 6e 67 54 6f 42 75 66 66 65 72 28 69 6e 66 6f 2e 49 74 65 6d 31 2c .WriteStringToBuffer(info.Item1,
3820 20 28 49 6e 74 50 74 72 29 6b 65 79 4e 61 6d 65 43 6f 6d 6d 61 6e 64 2d 3e 6e 61 6d 65 42 75 66 .(IntPtr)keyNameCommand->nameBuf
3840 66 65 72 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 fer,............................
3860 20 20 20 20 20 20 20 20 20 20 51 75 65 72 79 4b 65 79 4e 61 6d 65 43 6f 6d 6d 61 6e 64 2e 6b 4d ..........QueryKeyNameCommand.kM
3880 61 78 4e 61 6d 65 4c 65 6e 67 74 68 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 axNameLength);..................
38a0 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ............}...................
38c0 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 51 75 65 72 79 4b 65 79 4e 61 6d 65 .............return.QueryKeyName
38e0 43 6f 6d 6d 61 6e 64 2e 6b 53 69 7a 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Command.kSize;..................
3900 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ........}.......................
3920 20 20 20 20 20 72 65 74 75 72 6e 20 49 6e 70 75 74 44 65 76 69 63 65 43 6f 6d 6d 61 6e 64 2e 47 .....return.InputDeviceCommand.G
3940 65 6e 65 72 69 63 46 61 69 6c 75 72 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 enericFailure;..................
3960 20 20 20 20 7d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 ....});..............}..........
3980 20 20 20 20 20 20 6d 5f 4b 65 79 49 6e 66 6f 73 5b 6b 65 79 5d 20 3d 20 6e 65 77 20 54 75 70 6c ......m_KeyInfos[key].=.new.Tupl
39a0 65 3c 73 74 72 69 6e 67 2c 20 69 6e 74 3e 28 64 69 73 70 6c 61 79 4e 61 6d 65 2c 20 73 63 61 6e e<string,.int>(displayName,.scan
39c0 43 6f 64 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 61 6b 65 20 73 75 Code);................//.Make.su
39e0 72 65 20 63 61 63 68 65 73 20 6f 6e 20 6b 65 79 73 20 61 72 65 20 66 6c 75 73 68 65 64 2e 0d 0a re.caches.on.keys.are.flushed...
3a00 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 51 75 65 75 65 43 6f 6e ............InputSystem.QueueCon
3a20 66 69 67 43 68 61 6e 67 65 45 76 65 6e 74 28 4b 65 79 62 6f 61 72 64 2e 63 75 72 72 65 6e 74 29 figChangeEvent(Keyboard.current)
3a40 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 55 70 64 61 74 ;..............InputSystem.Updat
3a60 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c e();..........}............///.<
3a80 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 64 64 20 73 75 70 70 6f 72 summary>..........///.Add.suppor
3aa0 74 20 66 6f 72 20 3c 73 65 65 20 63 72 65 66 3d 22 51 75 65 72 79 43 61 6e 52 75 6e 49 6e 42 61 t.for.<see.cref="QueryCanRunInBa
3ac0 63 6b 67 72 6f 75 6e 64 22 2f 3e 20 74 6f 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 64 ckground"/>.to.<paramref.name="d
3ae0 65 76 69 63 65 22 2f 3e 20 61 6e 64 20 72 65 74 75 72 6e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f evice"/>.and.return..........///
3b00 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 76 61 6c 75 65 22 2f 3e 20 61 73 20 3c 73 65 .<paramref.name="value"/>.as.<se
3b20 65 20 63 72 65 66 3d 22 51 75 65 72 79 43 61 6e 52 75 6e 49 6e 42 61 63 6b 67 72 6f 75 6e 64 2e e.cref="QueryCanRunInBackground.
3b40 63 61 6e 52 75 6e 49 6e 42 61 63 6b 67 72 6f 75 6e 64 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 canRunInBackground"/>...........
3b60 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 ///.</summary>..........///.<par
3b80 61 6d 20 6e 61 6d 65 3d 22 64 65 76 69 63 65 22 3e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 am.name="device"></param>.......
3ba0 20 20 20 69 6e 74 65 72 6e 61 6c 20 75 6e 73 61 66 65 20 76 6f 69 64 20 53 65 74 43 61 6e 52 75 ...internal.unsafe.void.SetCanRu
3bc0 6e 49 6e 42 61 63 6b 67 72 6f 75 6e 64 28 49 6e 70 75 74 44 65 76 69 63 65 20 64 65 76 69 63 65 nInBackground(InputDevice.device
3be0 2c 20 62 6f 6f 6c 20 63 61 6e 52 75 6e 49 6e 42 61 63 6b 67 72 6f 75 6e 64 20 3d 20 74 72 75 65 ,.bool.canRunInBackground.=.true
3c00 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 75 6e 74 69 6d )..........{..............runtim
3c20 65 2e 53 65 74 44 65 76 69 63 65 43 6f 6d 6d 61 6e 64 43 61 6c 6c 62 61 63 6b 28 64 65 76 69 63 e.SetDeviceCommandCallback(devic
3c40 65 2c 20 28 69 64 2c 20 63 6f 6d 6d 61 6e 64 29 20 3d 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 e,.(id,.command).=>.............
3c60 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6d 6d 61 6e 64 2d .{..................if.(command-
3c80 3e 74 79 70 65 20 3d 3d 20 51 75 65 72 79 43 61 6e 52 75 6e 49 6e 42 61 63 6b 67 72 6f 75 6e 64 >type.==.QueryCanRunInBackground
3ca0 2e 54 79 70 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 .Type)..................{.......
3cc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 28 51 75 65 72 79 43 61 6e 52 75 6e 49 6e 42 61 ...............((QueryCanRunInBa
3ce0 63 6b 67 72 6f 75 6e 64 2a 29 63 6f 6d 6d 61 6e 64 29 2d 3e 63 61 6e 52 75 6e 49 6e 42 61 63 6b ckground*)command)->canRunInBack
3d00 67 72 6f 75 6e 64 20 3d 20 63 61 6e 52 75 6e 49 6e 42 61 63 6b 67 72 6f 75 6e 64 3b 0d 0a 20 20 ground.=.canRunInBackground;....
3d20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 49 6e 70 75 74 44 65 ..................return.InputDe
3d40 76 69 63 65 43 6f 6d 6d 61 6e 64 2e 47 65 6e 65 72 69 63 53 75 63 63 65 73 73 3b 0d 0a 20 20 20 viceCommand.GenericSuccess;.....
3d60 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............}..................
3d80 72 65 74 75 72 6e 20 49 6e 70 75 74 44 65 76 69 63 65 43 6f 6d 6d 61 6e 64 2e 47 65 6e 65 72 69 return.InputDeviceCommand.Generi
3da0 63 46 61 69 6c 75 72 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 29 3b 0d 0a 20 20 20 20 cFailure;..............});......
3dc0 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 43 6f ....}............public.ActionCo
3de0 6e 73 74 72 61 69 6e 74 20 53 74 61 72 74 65 64 28 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 nstraint.Started(InputAction.act
3e00 69 6f 6e 2c 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 72 6f 6c 20 3d 20 6e 75 6c 6c ion,.InputControl.control.=.null
3e20 2c 20 64 6f 75 62 6c 65 3f 20 74 69 6d 65 20 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 ,.double?.time.=.null)..........
3e40 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 41 63 74 69 6f 6e {..............return.new.Action
3e60 43 6f 6e 73 74 72 61 69 6e 74 28 49 6e 70 75 74 41 63 74 69 6f 6e 50 68 61 73 65 2e 53 74 61 72 Constraint(InputActionPhase.Star
3e80 74 65 64 2c 20 61 63 74 69 6f 6e 2c 20 63 6f 6e 74 72 6f 6c 2c 20 74 69 6d 65 3a 20 74 69 6d 65 ted,.action,.control,.time:.time
3ea0 2c 20 64 75 72 61 74 69 6f 6e 3a 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 ,.duration:.0);..........}......
3ec0 20 20 20 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 43 6f 6e 73 74 72 61 69 6e 74 20 53 74 ......public.ActionConstraint.St
3ee0 61 72 74 65 64 3c 54 56 61 6c 75 65 3e 28 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e arted<TValue>(InputAction.action
3f00 2c 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 3c 54 56 61 6c 75 65 3e 20 63 6f 6e 74 72 6f 6c 2c 20 ,.InputControl<TValue>.control,.
3f20 54 56 61 6c 75 65 20 76 61 6c 75 65 2c 20 64 6f 75 62 6c 65 3f 20 74 69 6d 65 20 3d 20 6e 75 6c TValue.value,.double?.time.=.nul
3f40 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 65 72 65 20 54 56 61 6c 75 65 20 3a 20 73 l)..............where.TValue.:.s
3f60 74 72 75 63 74 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 truct..........{..............re
3f80 74 75 72 6e 20 6e 65 77 20 41 63 74 69 6f 6e 43 6f 6e 73 74 72 61 69 6e 74 28 49 6e 70 75 74 41 turn.new.ActionConstraint(InputA
3fa0 63 74 69 6f 6e 50 68 61 73 65 2e 53 74 61 72 74 65 64 2c 20 61 63 74 69 6f 6e 2c 20 63 6f 6e 74 ctionPhase.Started,.action,.cont
3fc0 72 6f 6c 2c 20 76 61 6c 75 65 2c 20 74 69 6d 65 3a 20 74 69 6d 65 2c 20 64 75 72 61 74 69 6f 6e rol,.value,.time:.time,.duration
3fe0 3a 20 30 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c :.0);..........}............publ
4000 69 63 20 41 63 74 69 6f 6e 43 6f 6e 73 74 72 61 69 6e 74 20 50 65 72 66 6f 72 6d 65 64 28 49 6e ic.ActionConstraint.Performed(In
4020 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 2c 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 63 putAction.action,.InputControl.c
4040 6f 6e 74 72 6f 6c 20 3d 20 6e 75 6c 6c 2c 20 64 6f 75 62 6c 65 3f 20 74 69 6d 65 20 3d 20 6e 75 ontrol.=.null,.double?.time.=.nu
4060 6c 6c 2c 20 64 6f 75 62 6c 65 3f 20 64 75 72 61 74 69 6f 6e 20 3d 20 6e 75 6c 6c 29 0d 0a 20 20 ll,.double?.duration.=.null)....
4080 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 ......{..............return.new.
40a0 41 63 74 69 6f 6e 43 6f 6e 73 74 72 61 69 6e 74 28 49 6e 70 75 74 41 63 74 69 6f 6e 50 68 61 73 ActionConstraint(InputActionPhas
40c0 65 2e 50 65 72 66 6f 72 6d 65 64 2c 20 61 63 74 69 6f 6e 2c 20 63 6f 6e 74 72 6f 6c 2c 20 74 69 e.Performed,.action,.control,.ti
40e0 6d 65 3a 20 74 69 6d 65 2c 20 64 75 72 61 74 69 6f 6e 3a 20 64 75 72 61 74 69 6f 6e 29 3b 0d 0a me:.time,.duration:.duration);..
4100 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 ........}............public.Acti
4120 6f 6e 43 6f 6e 73 74 72 61 69 6e 74 20 50 65 72 66 6f 72 6d 65 64 3c 54 56 61 6c 75 65 3e 28 49 onConstraint.Performed<TValue>(I
4140 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 2c 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 3c nputAction.action,.InputControl<
4160 54 56 61 6c 75 65 3e 20 63 6f 6e 74 72 6f 6c 2c 20 54 56 61 6c 75 65 20 76 61 6c 75 65 2c 20 64 TValue>.control,.TValue.value,.d
4180 6f 75 62 6c 65 3f 20 74 69 6d 65 20 3d 20 6e 75 6c 6c 2c 20 64 6f 75 62 6c 65 3f 20 64 75 72 61 ouble?.time.=.null,.double?.dura
41a0 74 69 6f 6e 20 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 65 72 65 20 tion.=.null)..............where.
41c0 54 56 61 6c 75 65 20 3a 20 73 74 72 75 63 74 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 TValue.:.struct..........{......
41e0 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 41 63 74 69 6f 6e 43 6f 6e 73 74 72 61 ........return.new.ActionConstra
4200 69 6e 74 28 49 6e 70 75 74 41 63 74 69 6f 6e 50 68 61 73 65 2e 50 65 72 66 6f 72 6d 65 64 2c 20 int(InputActionPhase.Performed,.
4220 61 63 74 69 6f 6e 2c 20 63 6f 6e 74 72 6f 6c 2c 20 76 61 6c 75 65 2c 20 74 69 6d 65 3a 20 74 69 action,.control,.value,.time:.ti
4240 6d 65 2c 20 64 75 72 61 74 69 6f 6e 3a 20 64 75 72 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 me,.duration:.duration);........
4260 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 43 6f 6e 73 ..}............public.ActionCons
4280 74 72 61 69 6e 74 20 43 61 6e 63 65 6c 65 64 28 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 traint.Canceled(InputAction.acti
42a0 6f 6e 2c 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 72 6f 6c 20 3d 20 6e 75 6c 6c 2c on,.InputControl.control.=.null,
42c0 20 64 6f 75 62 6c 65 3f 20 74 69 6d 65 20 3d 20 6e 75 6c 6c 2c 20 64 6f 75 62 6c 65 3f 20 64 75 .double?.time.=.null,.double?.du
42e0 72 61 74 69 6f 6e 20 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 ration.=.null)..........{.......
4300 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 41 63 74 69 6f 6e 43 6f 6e 73 74 72 61 69 .......return.new.ActionConstrai
4320 6e 74 28 49 6e 70 75 74 41 63 74 69 6f 6e 50 68 61 73 65 2e 43 61 6e 63 65 6c 65 64 2c 20 61 63 nt(InputActionPhase.Canceled,.ac
4340 74 69 6f 6e 2c 20 63 6f 6e 74 72 6f 6c 2c 20 74 69 6d 65 3a 20 74 69 6d 65 2c 20 64 75 72 61 74 tion,.control,.time:.time,.durat
4360 69 6f 6e 3a 20 64 75 72 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 ion:.duration);..........}......
4380 20 20 20 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 43 6f 6e 73 74 72 61 69 6e 74 20 43 61 ......public.ActionConstraint.Ca
43a0 6e 63 65 6c 65 64 3c 54 56 61 6c 75 65 3e 28 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f nceled<TValue>(InputAction.actio
43c0 6e 2c 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 3c 54 56 61 6c 75 65 3e 20 63 6f 6e 74 72 6f 6c 2c n,.InputControl<TValue>.control,
43e0 20 54 56 61 6c 75 65 20 76 61 6c 75 65 2c 20 64 6f 75 62 6c 65 3f 20 74 69 6d 65 20 3d 20 6e 75 .TValue.value,.double?.time.=.nu
4400 6c 6c 2c 20 64 6f 75 62 6c 65 3f 20 64 75 72 61 74 69 6f 6e 20 3d 20 6e 75 6c 6c 29 0d 0a 20 20 ll,.double?.duration.=.null)....
4420 20 20 20 20 20 20 20 20 20 20 77 68 65 72 65 20 54 56 61 6c 75 65 20 3a 20 73 74 72 75 63 74 0d ..........where.TValue.:.struct.
4440 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e .........{..............return.n
4460 65 77 20 41 63 74 69 6f 6e 43 6f 6e 73 74 72 61 69 6e 74 28 49 6e 70 75 74 41 63 74 69 6f 6e 50 ew.ActionConstraint(InputActionP
4480 68 61 73 65 2e 43 61 6e 63 65 6c 65 64 2c 20 61 63 74 69 6f 6e 2c 20 63 6f 6e 74 72 6f 6c 2c 20 hase.Canceled,.action,.control,.
44a0 76 61 6c 75 65 2c 20 74 69 6d 65 3a 20 74 69 6d 65 2c 20 64 75 72 61 74 69 6f 6e 3a 20 64 75 72 value,.time:.time,.duration:.dur
44c0 61 74 69 6f 6e 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 ation);..........}............pu
44e0 62 6c 69 63 20 41 63 74 69 6f 6e 43 6f 6e 73 74 72 61 69 6e 74 20 53 74 61 72 74 65 64 3c 54 49 blic.ActionConstraint.Started<TI
4500 6e 74 65 72 61 63 74 69 6f 6e 3e 28 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 2c 20 nteraction>(InputAction.action,.
4520 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 72 6f 6c 20 3d 20 6e 75 6c 6c 2c 20 6f 62 6a InputControl.control.=.null,.obj
4540 65 63 74 20 76 61 6c 75 65 20 3d 20 6e 75 6c 6c 2c 20 64 6f 75 62 6c 65 3f 20 74 69 6d 65 20 3d ect.value.=.null,.double?.time.=
4560 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 65 72 65 20 54 49 6e 74 65 72 .null)..............where.TInter
4580 61 63 74 69 6f 6e 20 3a 20 49 49 6e 70 75 74 49 6e 74 65 72 61 63 74 69 6f 6e 0d 0a 20 20 20 20 action.:.IInputInteraction......
45a0 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 41 63 ....{..............return.new.Ac
45c0 74 69 6f 6e 43 6f 6e 73 74 72 61 69 6e 74 28 49 6e 70 75 74 41 63 74 69 6f 6e 50 68 61 73 65 2e tionConstraint(InputActionPhase.
45e0 53 74 61 72 74 65 64 2c 20 61 63 74 69 6f 6e 2c 20 63 6f 6e 74 72 6f 6c 2c 20 69 6e 74 65 72 61 Started,.action,.control,.intera
4600 63 74 69 6f 6e 3a 20 74 79 70 65 6f 66 28 54 49 6e 74 65 72 61 63 74 69 6f 6e 29 2c 20 74 69 6d ction:.typeof(TInteraction),.tim
4620 65 3a 20 74 69 6d 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 75 72 61 74 69 e:.time,..................durati
4640 6f 6e 3a 20 30 2c 20 76 61 6c 75 65 3a 20 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d on:.0,.value:.value);..........}
4660 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 43 6f 6e 73 74 72 61 ............public.ActionConstra
4680 69 6e 74 20 50 65 72 66 6f 72 6d 65 64 3c 54 49 6e 74 65 72 61 63 74 69 6f 6e 3e 28 49 6e 70 75 int.Performed<TInteraction>(Inpu
46a0 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 2c 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 63 6f 6e tAction.action,.InputControl.con
46c0 74 72 6f 6c 20 3d 20 6e 75 6c 6c 2c 20 6f 62 6a 65 63 74 20 76 61 6c 75 65 20 3d 20 6e 75 6c 6c trol.=.null,.object.value.=.null
46e0 2c 20 64 6f 75 62 6c 65 3f 20 74 69 6d 65 20 3d 20 6e 75 6c 6c 2c 20 64 6f 75 62 6c 65 3f 20 64 ,.double?.time.=.null,.double?.d
4700 75 72 61 74 69 6f 6e 20 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 65 uration.=.null)..............whe
4720 72 65 20 54 49 6e 74 65 72 61 63 74 69 6f 6e 20 3a 20 49 49 6e 70 75 74 49 6e 74 65 72 61 63 74 re.TInteraction.:.IInputInteract
4740 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 ion..........{..............retu
4760 72 6e 20 6e 65 77 20 41 63 74 69 6f 6e 43 6f 6e 73 74 72 61 69 6e 74 28 49 6e 70 75 74 41 63 74 rn.new.ActionConstraint(InputAct
4780 69 6f 6e 50 68 61 73 65 2e 50 65 72 66 6f 72 6d 65 64 2c 20 61 63 74 69 6f 6e 2c 20 63 6f 6e 74 ionPhase.Performed,.action,.cont
47a0 72 6f 6c 2c 20 69 6e 74 65 72 61 63 74 69 6f 6e 3a 20 74 79 70 65 6f 66 28 54 49 6e 74 65 72 61 rol,.interaction:.typeof(TIntera
47c0 63 74 69 6f 6e 29 2c 20 74 69 6d 65 3a 20 74 69 6d 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ction),.time:.time,.............
47e0 20 20 20 20 20 64 75 72 61 74 69 6f 6e 3a 20 64 75 72 61 74 69 6f 6e 2c 20 76 61 6c 75 65 3a 20 .....duration:.duration,.value:.
4800 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 value);..........}............pu
4820 62 6c 69 63 20 41 63 74 69 6f 6e 43 6f 6e 73 74 72 61 69 6e 74 20 43 61 6e 63 65 6c 65 64 3c 54 blic.ActionConstraint.Canceled<T
4840 49 6e 74 65 72 61 63 74 69 6f 6e 3e 28 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 2c Interaction>(InputAction.action,
4860 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 72 6f 6c 20 3d 20 6e 75 6c 6c 2c 20 6f 62 .InputControl.control.=.null,.ob
4880 6a 65 63 74 20 76 61 6c 75 65 20 3d 20 6e 75 6c 6c 2c 20 64 6f 75 62 6c 65 3f 20 74 69 6d 65 20 ject.value.=.null,.double?.time.
48a0 3d 20 6e 75 6c 6c 2c 20 64 6f 75 62 6c 65 3f 20 64 75 72 61 74 69 6f 6e 20 3d 20 6e 75 6c 6c 29 =.null,.double?.duration.=.null)
48c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 65 72 65 20 54 49 6e 74 65 72 61 63 74 69 6f 6e ..............where.TInteraction
48e0 20 3a 20 49 49 6e 70 75 74 49 6e 74 65 72 61 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 7b 0d .:.IInputInteraction..........{.
4900 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 41 63 74 69 6f 6e 43 6f .............return.new.ActionCo
4920 6e 73 74 72 61 69 6e 74 28 49 6e 70 75 74 41 63 74 69 6f 6e 50 68 61 73 65 2e 43 61 6e 63 65 6c nstraint(InputActionPhase.Cancel
4940 65 64 2c 20 61 63 74 69 6f 6e 2c 20 63 6f 6e 74 72 6f 6c 2c 20 69 6e 74 65 72 61 63 74 69 6f 6e ed,.action,.control,.interaction
4960 3a 20 74 79 70 65 6f 66 28 54 49 6e 74 65 72 61 63 74 69 6f 6e 29 2c 20 74 69 6d 65 3a 20 74 69 :.typeof(TInteraction),.time:.ti
4980 6d 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 75 72 61 74 69 6f 6e 3a 20 64 me,..................duration:.d
49a0 75 72 61 74 69 6f 6e 2c 20 76 61 6c 75 65 3a 20 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 uration,.value:.value);.........
49c0 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 52 65 53 68 61 72 70 65 72 20 64 69 73 61 62 .}............//.ReSharper.disab
49e0 6c 65 20 6f 6e 63 65 20 4d 65 6d 62 65 72 43 61 6e 42 65 50 72 6f 74 65 63 74 65 64 2e 47 6c 6f le.once.MemberCanBeProtected.Glo
4a00 62 61 6c 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 50 72 65 73 73 28 42 bal..........public.void.Press(B
4a20 75 74 74 6f 6e 43 6f 6e 74 72 6f 6c 20 62 75 74 74 6f 6e 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 uttonControl.button,.double.time
4a40 20 3d 20 2d 31 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 4f 66 66 73 65 74 20 3d 20 30 2c 20 62 6f .=.-1,.double.timeOffset.=.0,.bo
4a60 6f 6c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 20 3d 20 66 61 6c 73 65 29 0d 0a 20 20 20 20 ol.queueEventOnly.=.false)......
4a80 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 28 62 75 74 74 6f 6e 2c 20 31 ....{..............Set(button,.1
4aa0 2c 20 74 69 6d 65 2c 20 74 69 6d 65 4f 66 66 73 65 74 2c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e ,.time,.timeOffset,.queueEventOn
4ac0 6c 79 3a 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d ly:.queueEventOnly);..........}.
4ae0 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 52 65 53 68 61 72 70 65 72 20 64 69 73 61 62 6c 65 20 ...........//.ReSharper.disable.
4b00 6f 6e 63 65 20 4d 65 6d 62 65 72 43 61 6e 42 65 50 72 6f 74 65 63 74 65 64 2e 47 6c 6f 62 61 6c once.MemberCanBeProtected.Global
4b20 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 52 65 6c 65 61 73 65 28 42 75 ..........public.void.Release(Bu
4b40 74 74 6f 6e 43 6f 6e 74 72 6f 6c 20 62 75 74 74 6f 6e 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 20 ttonControl.button,.double.time.
4b60 3d 20 2d 31 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 4f 66 66 73 65 74 20 3d 20 30 2c 20 62 6f 6f =.-1,.double.timeOffset.=.0,.boo
4b80 6c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 20 3d 20 66 61 6c 73 65 29 0d 0a 20 20 20 20 20 l.queueEventOnly.=.false).......
4ba0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 28 62 75 74 74 6f 6e 2c 20 30 2c ...{..............Set(button,.0,
4bc0 20 74 69 6d 65 2c 20 74 69 6d 65 4f 66 66 73 65 74 2c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c .time,.timeOffset,.queueEventOnl
4be0 79 3a 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a y:.queueEventOnly);..........}..
4c00 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 52 65 53 68 61 72 70 65 72 20 64 69 73 61 62 6c 65 20 6f ..........//.ReSharper.disable.o
4c20 6e 63 65 20 4d 65 6d 62 65 72 43 61 6e 42 65 50 72 69 76 61 74 65 2e 47 6c 6f 62 61 6c 0d 0a 20 nce.MemberCanBePrivate.Global...
4c40 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 50 72 65 73 73 41 6e 64 52 65 6c 65 61 .......public.void.PressAndRelea
4c60 73 65 28 42 75 74 74 6f 6e 43 6f 6e 74 72 6f 6c 20 62 75 74 74 6f 6e 2c 20 64 6f 75 62 6c 65 20 se(ButtonControl.button,.double.
4c80 74 69 6d 65 20 3d 20 2d 31 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 4f 66 66 73 65 74 20 3d 20 30 time.=.-1,.double.timeOffset.=.0
4ca0 2c 20 62 6f 6f 6c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 20 3d 20 66 61 6c 73 65 29 0d 0a ,.bool.queueEventOnly.=.false)..
4cc0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 50 72 65 73 73 28 62 75 74 ........{..............Press(but
4ce0 74 6f 6e 2c 20 74 69 6d 65 2c 20 74 69 6d 65 4f 66 66 73 65 74 2c 20 71 75 65 75 65 45 76 65 6e ton,.time,.timeOffset,.queueEven
4d00 74 4f 6e 6c 79 3a 20 74 72 75 65 29 3b 20 20 2f 2f 20 54 68 69 73 20 6f 6e 65 20 69 73 20 61 6c tOnly:.true);..//.This.one.is.al
4d20 77 61 79 73 20 6a 75 73 74 20 61 20 71 75 65 75 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ways.just.a.queue...............
4d40 52 65 6c 65 61 73 65 28 62 75 74 74 6f 6e 2c 20 74 69 6d 65 2c 20 74 69 6d 65 4f 66 66 73 65 74 Release(button,.time,.timeOffset
4d60 2c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 3a 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 ,.queueEventOnly:.queueEventOnly
4d80 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 52 65 53 68 );..........}............//.ReSh
4da0 61 72 70 65 72 20 64 69 73 61 62 6c 65 20 6f 6e 63 65 20 4d 65 6d 62 65 72 43 61 6e 42 65 50 72 arper.disable.once.MemberCanBePr
4dc0 6f 74 65 63 74 65 64 2e 47 6c 6f 62 61 6c 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 otected.Global..........public.v
4de0 6f 69 64 20 43 6c 69 63 6b 28 42 75 74 74 6f 6e 43 6f 6e 74 72 6f 6c 20 62 75 74 74 6f 6e 2c 20 oid.Click(ButtonControl.button,.
4e00 64 6f 75 62 6c 65 20 74 69 6d 65 20 3d 20 2d 31 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 4f 66 66 double.time.=.-1,.double.timeOff
4e20 73 65 74 20 3d 20 30 2c 20 62 6f 6f 6c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 20 3d 20 66 set.=.0,.bool.queueEventOnly.=.f
4e40 61 6c 73 65 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 50 72 alse)..........{..............Pr
4e60 65 73 73 41 6e 64 52 65 6c 65 61 73 65 28 62 75 74 74 6f 6e 2c 20 74 69 6d 65 2c 20 74 69 6d 65 essAndRelease(button,.time,.time
4e80 4f 66 66 73 65 74 2c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 3a 20 71 75 65 75 65 45 76 65 Offset,.queueEventOnly:.queueEve
4ea0 6e 74 4f 6e 6c 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f ntOnly);..........}............/
4ec0 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 65 74 20 74 68 //.<summary>..........///.Set.th
4ee0 65 20 63 6f 6e 74 72 6f 6c 20 77 69 74 68 20 74 68 65 20 67 69 76 65 6e 20 3c 70 61 72 61 6d 72 e.control.with.the.given.<paramr
4f00 65 66 20 6e 61 6d 65 3d 22 70 61 74 68 22 2f 3e 20 6f 6e 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 ef.name="path"/>.on.<paramref.na
4f20 6d 65 3d 22 64 65 76 69 63 65 22 2f 3e 20 74 6f 20 74 68 65 20 67 69 76 65 6e 20 3c 70 61 72 61 me="device"/>.to.the.given.<para
4f40 6d 72 65 66 20 6e 61 6d 65 3d 22 73 74 61 74 65 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f mref.name="state"/>..........///
4f60 20 62 79 20 73 65 6e 64 69 6e 67 20 61 20 73 74 61 74 65 20 65 76 65 6e 74 20 77 69 74 68 20 74 .by.sending.a.state.event.with.t
4f80 68 65 20 76 61 6c 75 65 20 74 6f 20 74 68 65 20 64 65 76 69 63 65 2e 0d 0a 20 20 20 20 20 20 20 he.value.to.the.device..........
4fa0 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 .///.</summary>..........///.<pa
4fc0 72 61 6d 20 6e 61 6d 65 3d 22 64 65 76 69 63 65 22 3e 44 65 76 69 63 65 20 6f 6e 20 77 68 69 63 ram.name="device">Device.on.whic
4fe0 68 20 74 6f 20 66 69 6e 64 20 61 20 63 6f 6e 74 72 6f 6c 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 h.to.find.a.control.</param>....
5000 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 70 61 74 68 22 3e 50 61 74 ......///.<param.name="path">Pat
5020 68 20 6f 66 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 6f 6e 20 74 68 65 20 64 65 76 69 63 65 2e 3c h.of.the.control.on.the.device.<
5040 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 /param>..........///.<param.name
5060 3d 22 73 74 61 74 65 22 3e 4e 65 77 20 73 74 61 74 65 20 66 6f 72 20 74 68 65 20 63 6f 6e 74 72 ="state">New.state.for.the.contr
5080 6f 6c 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 ol.</param>..........///.<param.
50a0 6e 61 6d 65 3d 22 74 69 6d 65 22 3e 54 69 6d 65 73 74 61 6d 70 20 74 6f 20 75 73 65 20 66 6f 72 name="time">Timestamp.to.use.for
50c0 20 74 68 65 20 73 74 61 74 65 20 65 76 65 6e 74 2e 20 49 66 20 2d 31 20 28 64 65 66 61 75 6c 74 .the.state.event..If.-1.(default
50e0 29 2c 20 63 75 72 72 65 6e 74 20 74 69 6d 65 20 69 73 20 75 73 65 64 20 28 73 65 65 20 3c 73 65 ),.current.time.is.used.(see.<se
5100 65 20 63 72 65 66 3d 22 49 6e 70 75 74 54 65 73 74 46 69 78 74 75 72 65 2e 63 75 72 72 65 6e 74 e.cref="InputTestFixture.current
5120 54 69 6d 65 22 2f 3e 29 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c Time"/>).</param>..........///.<
5140 70 61 72 61 6d 20 6e 61 6d 65 3d 22 74 69 6d 65 4f 66 66 73 65 74 22 3e 4f 66 66 73 65 74 20 74 param.name="timeOffset">Offset.t
5160 6f 20 61 70 70 6c 79 20 74 6f 20 74 68 65 20 63 75 72 72 65 6e 74 20 74 69 6d 65 2e 20 54 68 69 o.apply.to.the.current.time..Thi
5180 73 20 69 73 20 61 6e 20 61 6c 74 65 72 6e 61 74 69 76 65 20 74 6f 20 3c 70 61 72 61 6d 72 65 66 s.is.an.alternative.to.<paramref
51a0 20 6e 61 6d 65 3d 22 74 69 6d 65 22 2f 3e 2e 20 42 79 20 64 65 66 61 75 6c 74 2c 20 6e 6f 20 6f .name="time"/>..By.default,.no.o
51c0 66 66 73 65 74 20 69 73 20 61 70 70 6c 69 65 64 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 ffset.is.applied.</param>.......
51e0 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 71 75 65 75 65 45 76 65 6e 74 4f 6e ...///.<param.name="queueEventOn
5200 6c 79 22 3e 49 66 20 74 72 75 65 2c 20 6e 6f 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 ly">If.true,.no.<see.cref="Input
5220 53 79 73 74 65 6d 2e 55 70 64 61 74 65 22 2f 3e 20 77 69 6c 6c 20 62 65 20 70 65 72 66 6f 72 6d System.Update"/>.will.be.perform
5240 65 64 20 61 66 74 65 72 20 71 75 65 75 65 69 6e 67 20 74 68 65 20 65 76 65 6e 74 2e 20 54 68 69 ed.after.queueing.the.event..Thi
5260 73 20 77 69 6c 6c 20 6f 6e 6c 79 20 70 75 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 65 s.will.only.put..........///.the
5280 20 73 74 61 74 65 20 65 76 65 6e 74 20 6f 6e 20 74 68 65 20 65 76 65 6e 74 20 71 75 65 75 65 20 .state.event.on.the.event.queue.
52a0 61 6e 64 20 6e 6f 74 20 64 6f 20 61 6e 79 74 68 69 6e 67 20 65 6c 73 65 2e 20 54 68 65 20 64 65 and.not.do.anything.else..The.de
52c0 66 61 75 6c 74 20 69 73 20 74 6f 20 63 61 6c 6c 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 fault.is.to.call.<see.cref="Inpu
52e0 74 53 79 73 74 65 6d 2e 55 70 64 61 74 65 22 2f 3e 20 61 66 74 65 72 20 71 75 65 75 69 6e 67 20 tSystem.Update"/>.after.queuing.
5300 74 68 65 20 65 76 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 74 68 61 the.event...........///.Note.tha
5320 74 20 6e 6f 74 20 69 73 73 75 69 6e 67 20 61 6e 20 75 70 64 61 74 65 20 6d 65 61 6e 73 20 74 68 t.not.issuing.an.update.means.th
5340 65 20 73 74 61 74 65 20 6f 66 20 74 68 65 20 64 65 76 69 63 65 20 77 69 6c 6c 20 6e 6f 74 20 63 e.state.of.the.device.will.not.c
5360 68 61 6e 67 65 20 79 65 74 2e 20 54 68 69 73 20 6d 61 79 20 61 66 66 65 63 74 20 73 75 62 73 65 hange.yet..This.may.affect.subse
5380 71 75 65 6e 74 20 53 65 74 2f 50 72 65 73 73 2f 52 65 6c 65 61 73 65 2f 65 74 63 20 63 61 6c 6c quent.Set/Press/Release/etc.call
53a0 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 73 20 74 68 65 79 20 77 69 6c 6c 20 6e 6f 74 20 s..........///.as.they.will.not.
53c0 79 65 74 20 73 65 65 20 74 68 65 20 73 74 61 74 65 20 63 68 61 6e 67 65 2e 3c 2f 70 61 72 61 6d yet.see.the.state.change.</param
53e0 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 74 79 70 65 70 61 72 61 6d 20 6e 61 6d 65 3d 22 >..........///.<typeparam.name="
5400 54 56 61 6c 75 65 22 3e 56 61 6c 75 65 20 74 79 70 65 20 6f 66 20 74 68 65 20 63 6f 6e 74 72 6f TValue">Value.type.of.the.contro
5420 6c 2e 3c 2f 74 79 70 65 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 61 l.</typeparam>..........///.<exa
5440 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 63 6f 64 65 3e 0d 0a 20 20 20 20 20 mple>..........///.<code>.......
5460 20 20 20 2f 2f 2f 20 76 61 72 20 64 65 76 69 63 65 20 3d 20 49 6e 70 75 74 53 79 73 74 65 6d 2e ...///.var.device.=.InputSystem.
5480 41 64 64 44 65 76 69 63 65 28 22 54 65 73 74 44 65 76 69 63 65 22 29 3b 0d 0a 20 20 20 20 20 20 AddDevice("TestDevice");........
54a0 20 20 2f 2f 2f 20 53 65 74 26 6c 74 3b 42 75 74 74 6f 6e 43 6f 6e 74 72 6f 6c 26 67 74 3b 28 64 ..///.Set&lt;ButtonControl&gt;(d
54c0 65 76 69 63 65 2c 20 22 62 75 74 74 6f 6e 22 2c 20 31 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f evice,."button",.1);..........//
54e0 2f 20 53 65 74 26 6c 74 3b 41 78 69 73 43 6f 6e 74 72 6f 6c 26 67 74 3b 28 64 65 76 69 63 65 2c /.Set&lt;AxisControl&gt;(device,
5500 20 22 7b 50 72 69 6d 61 72 79 32 44 4d 6f 74 69 6f 6e 7d 2f 78 22 2c 20 31 32 33 2e 34 35 36 66 ."{Primary2DMotion}/x",.123.456f
5520 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 20 );..........///.</code>.........
5540 20 2f 2f 2f 20 3c 2f 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 .///.</example>..........public.
5560 76 6f 69 64 20 53 65 74 3c 54 56 61 6c 75 65 3e 28 49 6e 70 75 74 44 65 76 69 63 65 20 64 65 76 void.Set<TValue>(InputDevice.dev
5580 69 63 65 2c 20 73 74 72 69 6e 67 20 70 61 74 68 2c 20 54 56 61 6c 75 65 20 73 74 61 74 65 2c 20 ice,.string.path,.TValue.state,.
55a0 64 6f 75 62 6c 65 20 74 69 6d 65 20 3d 20 2d 31 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 4f 66 66 double.time.=.-1,.double.timeOff
55c0 73 65 74 20 3d 20 30 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 71 75 65 75 65 set.=.0,..............bool.queue
55e0 45 76 65 6e 74 4f 6e 6c 79 20 3d 20 66 61 6c 73 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 EventOnly.=.false)..............
5600 77 68 65 72 65 20 54 56 61 6c 75 65 20 3a 20 73 74 72 75 63 74 0d 0a 20 20 20 20 20 20 20 20 7b where.TValue.:.struct..........{
5620 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 64 65 76 69 63 65 20 3d 3d 20 6e 75 6c 6c ..............if.(device.==.null
5640 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 )..................throw.new.Arg
5660 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 64 65 76 69 63 65 umentNullException(nameof(device
5680 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 ));..............if.(string.IsNu
56a0 6c 6c 4f 72 45 6d 70 74 79 28 70 61 74 68 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 llOrEmpty(path))................
56c0 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f ..throw.new.ArgumentNullExceptio
56e0 6e 28 6e 61 6d 65 6f 66 28 70 61 74 68 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 n(nameof(path));................
5700 76 61 72 20 63 6f 6e 74 72 6f 6c 20 3d 20 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 3c 54 56 61 6c var.control.=.(InputControl<TVal
5720 75 65 3e 29 64 65 76 69 63 65 5b 70 61 74 68 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 ue>)device[path];..............S
5740 65 74 28 63 6f 6e 74 72 6f 6c 2c 20 73 74 61 74 65 2c 20 74 69 6d 65 2c 20 74 69 6d 65 4f 66 66 et(control,.state,.time,.timeOff
5760 73 65 74 2c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d set,.queueEventOnly);..........}
5780 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 ............///.<summary>.......
57a0 20 20 20 2f 2f 2f 20 53 65 74 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 74 6f 20 74 68 65 20 67 69 ...///.Set.the.control.to.the.gi
57c0 76 65 6e 20 76 61 6c 75 65 20 62 79 20 73 65 6e 64 69 6e 67 20 61 20 73 74 61 74 65 20 65 76 65 ven.value.by.sending.a.state.eve
57e0 6e 74 20 77 69 74 68 20 74 68 65 20 76 61 6c 75 65 20 74 6f 20 74 68 65 0d 0a 20 20 20 20 20 20 nt.with.the.value.to.the........
5800 20 20 2f 2f 2f 20 63 6f 6e 74 72 6f 6c 27 73 20 64 65 76 69 63 65 2e 0d 0a 20 20 20 20 20 20 20 ..///.control's.device..........
5820 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 .///.</summary>..........///.<pa
5840 72 61 6d 20 6e 61 6d 65 3d 22 63 6f 6e 74 72 6f 6c 22 3e 41 6e 20 69 6e 70 75 74 20 63 6f 6e 74 ram.name="control">An.input.cont
5860 72 6f 6c 20 6f 6e 20 61 20 64 65 76 69 63 65 20 74 68 61 74 20 68 61 73 20 62 65 65 6e 20 61 64 rol.on.a.device.that.has.been.ad
5880 64 65 64 20 74 6f 20 74 68 65 20 73 79 73 74 65 6d 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 ded.to.the.system.</param>......
58a0 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 73 74 61 74 65 22 3e 4e 65 77 20 ....///.<param.name="state">New.
58c0 76 61 6c 75 65 20 66 6f 72 20 74 68 65 20 69 6e 70 75 74 20 63 6f 6e 74 72 6f 6c 2e 3c 2f 70 61 value.for.the.input.control.</pa
58e0 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 74 ram>..........///.<param.name="t
5900 69 6d 65 22 3e 54 69 6d 65 73 74 61 6d 70 20 74 6f 20 75 73 65 20 66 6f 72 20 74 68 65 20 73 74 ime">Timestamp.to.use.for.the.st
5920 61 74 65 20 65 76 65 6e 74 2e 20 49 66 20 2d 31 20 28 64 65 66 61 75 6c 74 29 2c 20 63 75 72 72 ate.event..If.-1.(default),.curr
5940 65 6e 74 20 74 69 6d 65 20 69 73 20 75 73 65 64 20 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d ent.time.is.used.(see.<see.cref=
5960 22 49 6e 70 75 74 54 65 73 74 46 69 78 74 75 72 65 2e 63 75 72 72 65 6e 74 54 69 6d 65 22 2f 3e "InputTestFixture.currentTime"/>
5980 29 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e ).</param>..........///.<param.n
59a0 61 6d 65 3d 22 74 69 6d 65 4f 66 66 73 65 74 22 3e 4f 66 66 73 65 74 20 74 6f 20 61 70 70 6c 79 ame="timeOffset">Offset.to.apply
59c0 20 74 6f 20 74 68 65 20 63 75 72 72 65 6e 74 20 74 69 6d 65 2e 20 54 68 69 73 20 69 73 20 61 6e .to.the.current.time..This.is.an
59e0 20 61 6c 74 65 72 6e 61 74 69 76 65 20 74 6f 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 .alternative.to.<paramref.name="
5a00 74 69 6d 65 22 2f 3e 2e 20 42 79 20 64 65 66 61 75 6c 74 2c 20 6e 6f 20 6f 66 66 73 65 74 20 69 time"/>..By.default,.no.offset.i
5a20 73 20 61 70 70 6c 69 65 64 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 s.applied.</param>..........///.
5a40 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 22 3e 49 66 20 <param.name="queueEventOnly">If.
5a60 74 72 75 65 2c 20 6e 6f 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 53 79 73 74 65 6d 2e true,.no.<see.cref="InputSystem.
5a80 55 70 64 61 74 65 22 2f 3e 20 77 69 6c 6c 20 62 65 20 70 65 72 66 6f 72 6d 65 64 20 61 66 74 65 Update"/>.will.be.performed.afte
5aa0 72 20 71 75 65 75 65 69 6e 67 20 74 68 65 20 65 76 65 6e 74 2e 20 54 68 69 73 20 77 69 6c 6c 20 r.queueing.the.event..This.will.
5ac0 6f 6e 6c 79 20 70 75 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 65 20 73 74 61 74 65 20 only.put..........///.the.state.
5ae0 65 76 65 6e 74 20 6f 6e 20 74 68 65 20 65 76 65 6e 74 20 71 75 65 75 65 20 61 6e 64 20 6e 6f 74 event.on.the.event.queue.and.not
5b00 20 64 6f 20 61 6e 79 74 68 69 6e 67 20 65 6c 73 65 2e 20 54 68 65 20 64 65 66 61 75 6c 74 20 69 .do.anything.else..The.default.i
5b20 73 20 74 6f 20 63 61 6c 6c 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 53 79 73 74 65 6d s.to.call.<see.cref="InputSystem
5b40 2e 55 70 64 61 74 65 22 2f 3e 20 61 66 74 65 72 20 71 75 65 75 69 6e 67 20 74 68 65 20 65 76 65 .Update"/>.after.queuing.the.eve
5b60 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 74 68 61 74 20 6e 6f 74 20 69 nt...........///.Note.that.not.i
5b80 73 73 75 69 6e 67 20 61 6e 20 75 70 64 61 74 65 20 6d 65 61 6e 73 20 74 68 65 20 73 74 61 74 65 ssuing.an.update.means.the.state
5ba0 20 6f 66 20 74 68 65 20 64 65 76 69 63 65 20 77 69 6c 6c 20 6e 6f 74 20 63 68 61 6e 67 65 20 79 .of.the.device.will.not.change.y
5bc0 65 74 2e 20 54 68 69 73 20 6d 61 79 20 61 66 66 65 63 74 20 73 75 62 73 65 71 75 65 6e 74 20 53 et..This.may.affect.subsequent.S
5be0 65 74 2f 50 72 65 73 73 2f 52 65 6c 65 61 73 65 2f 65 74 63 20 63 61 6c 6c 73 0d 0a 20 20 20 20 et/Press/Release/etc.calls......
5c00 20 20 20 20 2f 2f 2f 20 61 73 20 74 68 65 79 20 77 69 6c 6c 20 6e 6f 74 20 79 65 74 20 73 65 65 ....///.as.they.will.not.yet.see
5c20 20 74 68 65 20 73 74 61 74 65 20 63 68 61 6e 67 65 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 .the.state.change.</param>......
5c40 20 20 20 20 2f 2f 2f 20 3c 74 79 70 65 70 61 72 61 6d 20 6e 61 6d 65 3d 22 54 56 61 6c 75 65 22 ....///.<typeparam.name="TValue"
5c60 3e 56 61 6c 75 65 20 74 79 70 65 20 6f 66 20 74 68 65 20 67 69 76 65 6e 20 63 6f 6e 74 72 6f 6c >Value.type.of.the.given.control
5c80 2e 3c 2f 74 79 70 65 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 65 78 61 6d .</typeparam>..........///.<exam
5ca0 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 63 6f 64 65 3e 0d 0a 20 20 20 20 20 20 ple>..........///.<code>........
5cc0 20 20 2f 2f 2f 20 76 61 72 20 67 61 6d 65 70 61 64 20 3d 20 49 6e 70 75 74 53 79 73 74 65 6d 2e ..///.var.gamepad.=.InputSystem.
5ce0 41 64 64 44 65 76 69 63 65 26 6c 74 3b 47 61 6d 65 70 61 64 26 67 74 3b 28 29 3b 0d 0a 20 20 20 AddDevice&lt;Gamepad&gt;();.....
5d00 20 20 20 20 20 2f 2f 2f 20 53 65 74 28 67 61 6d 65 70 61 64 2e 6c 65 66 74 42 75 74 74 6f 6e 2c .....///.Set(gamepad.leftButton,
5d20 20 31 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 20 .1);..........///.</code>.......
5d40 20 20 20 2f 2f 2f 20 3c 2f 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 ...///.</example>..........publi
5d60 63 20 76 6f 69 64 20 53 65 74 3c 54 56 61 6c 75 65 3e 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 3c c.void.Set<TValue>(InputControl<
5d80 54 56 61 6c 75 65 3e 20 63 6f 6e 74 72 6f 6c 2c 20 54 56 61 6c 75 65 20 73 74 61 74 65 2c 20 64 TValue>.control,.TValue.state,.d
5da0 6f 75 62 6c 65 20 74 69 6d 65 20 3d 20 2d 31 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 4f 66 66 73 ouble.time.=.-1,.double.timeOffs
5dc0 65 74 20 3d 20 30 2c 20 62 6f 6f 6c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 20 3d 20 66 61 et.=.0,.bool.queueEventOnly.=.fa
5de0 6c 73 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 65 72 65 20 54 56 61 6c 75 65 20 3a lse)..............where.TValue.:
5e00 20 73 74 72 75 63 74 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .struct..........{..............
5e20 69 66 20 28 63 6f 6e 74 72 6f 6c 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 if.(control.==.null)............
5e40 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 ......throw.new.ArgumentNullExce
5e60 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 63 6f 6e 74 72 6f 6c 29 29 3b 0d 0a 20 20 20 20 20 20 20 ption(nameof(control));.........
5e80 20 20 20 20 20 69 66 20 28 21 63 6f 6e 74 72 6f 6c 2e 64 65 76 69 63 65 2e 61 64 64 65 64 29 0d .....if.(!control.device.added).
5ea0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d .................throw.new.Argum
5ec0 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 entException(...................
5ee0 20 20 20 24 22 44 65 76 69 63 65 20 6f 66 20 63 6f 6e 74 72 6f 6c 20 27 7b 63 6f 6e 74 72 6f 6c ...$"Device.of.control.'{control
5f00 7d 27 20 68 61 73 20 6e 6f 74 20 62 65 65 6e 20 61 64 64 65 64 20 74 6f 20 74 68 65 20 73 79 73 }'.has.not.been.added.to.the.sys
5f20 74 65 6d 22 2c 20 6e 61 6d 65 6f 66 28 63 6f 6e 74 72 6f 6c 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 tem",.nameof(control));.........
5f40 20 20 20 20 20 20 20 76 6f 69 64 20 53 65 74 55 70 41 6e 64 51 75 65 75 65 45 76 65 6e 74 28 49 .......void.SetUpAndQueueEvent(I
5f60 6e 70 75 74 45 76 65 6e 74 50 74 72 20 65 76 65 6e 74 50 74 72 29 0d 0a 20 20 20 20 20 20 20 20 nputEventPtr.eventPtr)..........
5f80 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 ....{..................////REVIE
5fa0 57 3a 20 73 68 6f 75 6c 64 20 77 65 20 62 79 20 64 65 66 61 75 6c 74 20 74 61 6b 65 20 74 68 65 W:.should.we.by.default.take.the
5fc0 20 74 69 6d 65 20 66 72 6f 6d 20 74 68 65 20 64 65 76 69 63 65 20 68 65 72 65 3f 0d 0a 20 20 20 .time.from.the.device.here?.....
5fe0 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 69 6d 65 20 3e 3d 20 30 29 0d 0a 20 20 20 .............if.(time.>=.0).....
6000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 76 65 6e 74 50 74 72 2e 74 69 6d 65 20 3d .................eventPtr.time.=
6020 20 74 69 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 76 65 6e 74 50 74 72 .time;..................eventPtr
6040 2e 74 69 6d 65 20 2b 3d 20 74 69 6d 65 4f 66 66 73 65 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 .time.+=.timeOffset;............
6060 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 2e 57 72 69 74 65 56 61 6c 75 65 49 6e 74 6f 45 76 65 6e ......control.WriteValueIntoEven
6080 74 28 73 74 61 74 65 2c 20 65 76 65 6e 74 50 74 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 t(state,.eventPtr);.............
60a0 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 51 75 65 75 65 45 76 65 6e 74 28 65 76 65 6e .....InputSystem.QueueEvent(even
60c0 74 50 74 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 tPtr);..............}...........
60e0 20 20 20 20 20 2f 2f 20 54 6f 75 63 68 73 63 72 65 65 6e 20 64 6f 65 73 20 6e 6f 74 20 73 75 70 .....//.Touchscreen.does.not.sup
6100 70 6f 72 74 20 64 65 6c 74 61 20 65 76 65 6e 74 73 20 69 6e 76 6f 6c 76 69 6e 67 20 54 6f 75 63 port.delta.events.involving.Touc
6120 68 53 74 61 74 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6e 74 72 6f 6c hState...............if.(control
6140 20 69 73 20 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b .is.TouchControl)..............{
6160 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 73 69 6e 67 20 28 53 74 61 74 65 45 76 ..................using.(StateEv
6180 65 6e 74 2e 46 72 6f 6d 28 63 6f 6e 74 72 6f 6c 2e 64 65 76 69 63 65 2c 20 6f 75 74 20 76 61 72 ent.From(control.device,.out.var
61a0 20 65 76 65 6e 74 50 74 72 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .eventPtr)).....................
61c0 20 53 65 74 55 70 41 6e 64 51 75 65 75 65 45 76 65 6e 74 28 65 76 65 6e 74 50 74 72 29 3b 0d 0a .SetUpAndQueueEvent(eventPtr);..
61e0 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d ............}..............else.
6200 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............{..................
6220 2f 2f 20 57 65 20 75 73 65 20 64 65 6c 74 61 20 73 74 61 74 65 20 65 76 65 6e 74 73 20 72 61 74 //.We.use.delta.state.events.rat
6240 68 65 72 20 74 68 61 6e 20 66 75 6c 6c 20 73 74 61 74 65 20 65 76 65 6e 74 73 20 68 65 72 65 20 her.than.full.state.events.here.
6260 74 6f 20 6d 69 74 69 67 61 74 65 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 70 72 6f 62 6c 65 to.mitigate.the.following.proble
6280 6d 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 47 72 61 62 62 69 6e 67 20 m:..................//.Grabbing.
62a0 73 74 61 74 65 20 66 72 6f 6d 20 74 68 65 20 64 65 76 69 63 65 20 77 69 6c 6c 20 70 72 65 73 65 state.from.the.device.will.prese
62c0 72 76 65 20 74 68 65 20 63 75 72 72 65 6e 74 20 76 61 6c 75 65 73 20 6f 66 20 63 6f 6e 74 72 6f rve.the.current.values.of.contro
62e0 6c 73 20 63 6f 76 65 72 65 64 20 69 6e 20 74 68 65 20 73 74 61 74 65 2e 0d 0a 20 20 20 20 20 20 ls.covered.in.the.state.........
6300 20 20 20 20 20 20 20 20 20 20 2f 2f 20 48 6f 77 65 76 65 72 2c 20 72 75 6e 6e 69 6e 67 20 61 6e ..........//.However,.running.an
6320 20 75 70 64 61 74 65 20 6d 61 79 20 61 6c 74 65 72 20 74 68 65 20 76 61 6c 75 65 20 6f 66 20 6f .update.may.alter.the.value.of.o
6340 6e 65 20 6f 72 20 6d 6f 72 65 20 6f 66 20 74 68 6f 73 65 20 63 6f 6e 74 72 6f 6c 73 2e 20 53 6f ne.or.more.of.those.controls..So
6360 20 77 69 74 68 20 61 20 66 75 6c 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f .with.a.full..................//
6380 20 73 74 61 74 65 20 65 76 65 6e 74 2c 20 77 65 20 6d 61 79 20 62 65 20 77 72 69 74 69 6e 67 20 .state.event,.we.may.be.writing.
63a0 6f 75 74 64 61 74 65 64 20 64 61 74 61 20 62 61 63 6b 20 69 6e 74 6f 20 74 68 65 20 64 65 76 69 outdated.data.back.into.the.devi
63c0 63 65 2e 20 46 6f 72 20 65 78 61 6d 70 6c 65 2c 20 69 6e 20 74 68 65 20 63 61 73 65 20 6f 66 20 ce..For.example,.in.the.case.of.
63e0 64 65 6c 74 61 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 63 6f 6e 74 72 6f delta..................//.contro
6400 6c 73 20 77 68 69 63 68 20 77 69 6c 6c 20 72 65 73 65 74 20 69 6e 20 4f 6e 42 65 66 6f 72 65 55 ls.which.will.reset.in.OnBeforeU
6420 70 64 61 74 65 28 29 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 0d 0a 20 20 pdate()...................//....
6440 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 55 73 69 6e 67 20 64 65 6c 74 61 20 65 76 65 ..............//.Using.delta.eve
6460 6e 74 73 2c 20 77 65 20 6d 61 79 20 73 74 69 6c 6c 20 67 72 61 62 20 73 74 61 74 65 20 6f 75 74 nts,.we.may.still.grab.state.out
6480 73 69 64 65 20 6f 66 20 6a 75 73 74 20 74 68 65 20 6f 6e 65 20 63 6f 6e 74 72 6f 6c 20 69 6e 20 side.of.just.the.one.control.in.
64a0 63 61 73 65 20 77 65 27 72 65 20 6c 6f 6f 6b 69 6e 67 20 61 74 0d 0a 20 20 20 20 20 20 20 20 20 case.we're.looking.at...........
64c0 20 20 20 20 20 20 20 2f 2f 20 62 69 74 2d 61 64 64 72 65 73 73 65 64 20 63 6f 6e 74 72 6f 6c 73 .......//.bit-addressed.controls
64e0 20 62 75 74 20 61 74 20 6c 65 61 73 74 20 77 65 20 63 61 6e 20 61 76 6f 69 64 20 74 68 65 20 70 .but.at.least.we.can.avoid.the.p
6500 72 6f 62 6c 65 6d 20 66 6f 72 20 74 68 65 20 6d 61 6a 6f 72 69 74 79 20 6f 66 20 63 6f 6e 74 72 roblem.for.the.majority.of.contr
6520 6f 6c 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 73 69 6e 67 20 28 44 65 6c ols...................using.(Del
6540 74 61 53 74 61 74 65 45 76 65 6e 74 2e 46 72 6f 6d 28 63 6f 6e 74 72 6f 6c 2c 20 6f 75 74 20 76 taStateEvent.From(control,.out.v
6560 61 72 20 65 76 65 6e 74 50 74 72 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ar.eventPtr))...................
6580 20 20 20 53 65 74 55 70 41 6e 64 51 75 65 75 65 45 76 65 6e 74 28 65 76 65 6e 74 50 74 72 29 3b ...SetUpAndQueueEvent(eventPtr);
65a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 ..............}................i
65c0 66 20 28 21 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 f.(!queueEventOnly).............
65e0 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 55 70 64 61 74 65 28 29 3b 0d 0a 20 20 20 20 .....InputSystem.Update();......
6600 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 4d 6f 76 ....}............public.void.Mov
6620 65 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 3c 56 65 63 74 6f 72 32 3e 20 70 6f 73 69 74 69 6f 6e e(InputControl<Vector2>.position
6640 43 6f 6e 74 72 6f 6c 2c 20 56 65 63 74 6f 72 32 20 70 6f 73 69 74 69 6f 6e 2c 20 56 65 63 74 6f Control,.Vector2.position,.Vecto
6660 72 32 3f 20 64 65 6c 74 61 20 3d 20 6e 75 6c 6c 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 20 3d 20 r2?.delta.=.null,.double.time.=.
6680 2d 31 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 4f 66 66 73 65 74 20 3d 20 30 2c 20 62 6f 6f 6c 20 -1,.double.timeOffset.=.0,.bool.
66a0 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 20 3d 20 66 61 6c 73 65 29 0d 0a 20 20 20 20 20 20 20 queueEventOnly.=.false).........
66c0 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 28 70 6f 73 69 74 69 6f 6e 43 6f 6e 74 .{..............Set(positionCont
66e0 72 6f 6c 2c 20 70 6f 73 69 74 69 6f 6e 2c 20 74 69 6d 65 3a 20 74 69 6d 65 2c 20 74 69 6d 65 4f rol,.position,.time:.time,.timeO
6700 66 66 73 65 74 3a 20 74 69 6d 65 4f 66 66 73 65 74 2c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c ffset:.timeOffset,.queueEventOnl
6720 79 3a 20 74 72 75 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 64 65 6c y:.true);................var.del
6740 74 61 43 6f 6e 74 72 6f 6c 20 3d 20 28 56 65 63 74 6f 72 32 43 6f 6e 74 72 6f 6c 29 70 6f 73 69 taControl.=.(Vector2Control)posi
6760 74 69 6f 6e 43 6f 6e 74 72 6f 6c 2e 64 65 76 69 63 65 2e 54 72 79 47 65 74 43 68 69 6c 64 43 6f tionControl.device.TryGetChildCo
6780 6e 74 72 6f 6c 28 22 64 65 6c 74 61 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 ntrol("delta");..............if.
67a0 28 64 65 6c 74 61 43 6f 6e 74 72 6f 6c 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 (deltaControl.!=.null)..........
67c0 20 20 20 20 20 20 20 20 53 65 74 28 64 65 6c 74 61 43 6f 6e 74 72 6f 6c 2c 20 20 64 65 6c 74 61 ........Set(deltaControl,..delta
67e0 20 3f 3f 20 70 6f 73 69 74 69 6f 6e 20 2d 20 70 6f 73 69 74 69 6f 6e 43 6f 6e 74 72 6f 6c 2e 52 .??.position.-.positionControl.R
6800 65 61 64 56 61 6c 75 65 28 29 2c 20 74 69 6d 65 3a 20 74 69 6d 65 2c 20 74 69 6d 65 4f 66 66 73 eadValue(),.time:.time,.timeOffs
6820 65 74 3a 20 74 69 6d 65 4f 66 66 73 65 74 2c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 3a 20 et:.timeOffset,.queueEventOnly:.
6840 74 72 75 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 71 75 65 75 65 true);................if.(!queue
6860 45 76 65 6e 74 4f 6e 6c 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 EventOnly)..................Inpu
6880 74 53 79 73 74 65 6d 2e 55 70 64 61 74 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a tSystem.Update();..........}....
68a0 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 42 65 67 69 6e 54 6f 75 63 68 28 69 ........public.void.BeginTouch(i
68c0 6e 74 20 74 6f 75 63 68 49 64 2c 20 56 65 63 74 6f 72 32 20 70 6f 73 69 74 69 6f 6e 2c 20 62 6f nt.touchId,.Vector2.position,.bo
68e0 6f 6c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 20 3d 20 66 61 6c 73 65 2c 20 54 6f 75 63 68 ol.queueEventOnly.=.false,.Touch
6900 73 63 72 65 65 6e 20 73 63 72 65 65 6e 20 3d 20 6e 75 6c 6c 2c 0d 0a 20 20 20 20 20 20 20 20 20 screen.screen.=.null,...........
6920 20 20 20 64 6f 75 62 6c 65 20 74 69 6d 65 20 3d 20 2d 31 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 ...double.time.=.-1,.double.time
6940 4f 66 66 73 65 74 20 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 Offset.=.0)..........{..........
6960 20 20 20 20 53 65 74 54 6f 75 63 68 28 74 6f 75 63 68 49 64 2c 20 54 6f 75 63 68 50 68 61 73 65 ....SetTouch(touchId,.TouchPhase
6980 2e 42 65 67 61 6e 2c 20 70 6f 73 69 74 69 6f 6e 2c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 .Began,.position,.queueEventOnly
69a0 3a 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 2c 20 73 63 72 65 65 6e 3a 20 73 63 72 65 65 6e :.queueEventOnly,.screen:.screen
69c0 2c 20 74 69 6d 65 3a 20 74 69 6d 65 2c 20 74 69 6d 65 4f 66 66 73 65 74 3a 20 74 69 6d 65 4f 66 ,.time:.time,.timeOffset:.timeOf
69e0 66 73 65 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 fset);..........}............pub
6a00 6c 69 63 20 76 6f 69 64 20 4d 6f 76 65 54 6f 75 63 68 28 69 6e 74 20 74 6f 75 63 68 49 64 2c 20 lic.void.MoveTouch(int.touchId,.
6a20 56 65 63 74 6f 72 32 20 70 6f 73 69 74 69 6f 6e 2c 20 56 65 63 74 6f 72 32 20 64 65 6c 74 61 20 Vector2.position,.Vector2.delta.
6a40 3d 20 64 65 66 61 75 6c 74 2c 20 62 6f 6f 6c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 20 3d =.default,.bool.queueEventOnly.=
6a60 20 66 61 6c 73 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 6f 75 63 68 73 63 72 65 65 6e .false,..............Touchscreen
6a80 20 73 63 72 65 65 6e 20 3d 20 6e 75 6c 6c 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 20 3d 20 2d 31 .screen.=.null,.double.time.=.-1
6aa0 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 4f 66 66 73 65 74 20 3d 20 30 29 0d 0a 20 20 20 20 20 20 ,.double.timeOffset.=.0)........
6ac0 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 54 6f 75 63 68 28 74 6f 75 63 68 49 ..{..............SetTouch(touchI
6ae0 64 2c 20 54 6f 75 63 68 50 68 61 73 65 2e 4d 6f 76 65 64 2c 20 70 6f 73 69 74 69 6f 6e 2c 20 64 d,.TouchPhase.Moved,.position,.d
6b00 65 6c 74 61 2c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 2c 20 73 63 72 65 65 6e 3a 20 73 63 elta,.queueEventOnly,.screen:.sc
6b20 72 65 65 6e 2c 20 74 69 6d 65 3a 20 74 69 6d 65 2c 20 74 69 6d 65 4f 66 66 73 65 74 3a 20 74 69 reen,.time:.time,.timeOffset:.ti
6b40 6d 65 4f 66 66 73 65 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 meOffset);..........}...........
6b60 20 70 75 62 6c 69 63 20 76 6f 69 64 20 45 6e 64 54 6f 75 63 68 28 69 6e 74 20 74 6f 75 63 68 49 .public.void.EndTouch(int.touchI
6b80 64 2c 20 56 65 63 74 6f 72 32 20 70 6f 73 69 74 69 6f 6e 2c 20 56 65 63 74 6f 72 32 20 64 65 6c d,.Vector2.position,.Vector2.del
6ba0 74 61 20 3d 20 64 65 66 61 75 6c 74 2c 20 62 6f 6f 6c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c ta.=.default,.bool.queueEventOnl
6bc0 79 20 3d 20 66 61 6c 73 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 6f 75 63 68 73 63 72 y.=.false,..............Touchscr
6be0 65 65 6e 20 73 63 72 65 65 6e 20 3d 20 6e 75 6c 6c 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 20 3d een.screen.=.null,.double.time.=
6c00 20 2d 31 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 4f 66 66 73 65 74 20 3d 20 30 29 0d 0a 20 20 20 .-1,.double.timeOffset.=.0).....
6c20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 54 6f 75 63 68 28 74 6f 75 .....{..............SetTouch(tou
6c40 63 68 49 64 2c 20 54 6f 75 63 68 50 68 61 73 65 2e 45 6e 64 65 64 2c 20 70 6f 73 69 74 69 6f 6e chId,.TouchPhase.Ended,.position
6c60 2c 20 64 65 6c 74 61 2c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 2c 20 73 63 72 65 65 6e 3a ,.delta,.queueEventOnly,.screen:
6c80 20 73 63 72 65 65 6e 2c 20 74 69 6d 65 3a 20 74 69 6d 65 2c 20 74 69 6d 65 4f 66 66 73 65 74 3a .screen,.time:.time,.timeOffset:
6ca0 20 74 69 6d 65 4f 66 66 73 65 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 .timeOffset);..........}........
6cc0 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 43 61 6e 63 65 6c 54 6f 75 63 68 28 69 6e 74 20 ....public.void.CancelTouch(int.
6ce0 74 6f 75 63 68 49 64 2c 20 56 65 63 74 6f 72 32 20 70 6f 73 69 74 69 6f 6e 2c 20 56 65 63 74 6f touchId,.Vector2.position,.Vecto
6d00 72 32 20 64 65 6c 74 61 20 3d 20 64 65 66 61 75 6c 74 2c 20 62 6f 6f 6c 20 71 75 65 75 65 45 76 r2.delta.=.default,.bool.queueEv
6d20 65 6e 74 4f 6e 6c 79 20 3d 20 66 61 6c 73 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 6f entOnly.=.false,..............To
6d40 75 63 68 73 63 72 65 65 6e 20 73 63 72 65 65 6e 20 3d 20 6e 75 6c 6c 2c 20 64 6f 75 62 6c 65 20 uchscreen.screen.=.null,.double.
6d60 74 69 6d 65 20 3d 20 2d 31 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 4f 66 66 73 65 74 20 3d 20 30 time.=.-1,.double.timeOffset.=.0
6d80 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 54 6f 75 )..........{..............SetTou
6da0 63 68 28 74 6f 75 63 68 49 64 2c 20 54 6f 75 63 68 50 68 61 73 65 2e 43 61 6e 63 65 6c 65 64 2c ch(touchId,.TouchPhase.Canceled,
6dc0 20 70 6f 73 69 74 69 6f 6e 2c 20 64 65 6c 74 61 2c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 .position,.delta,.queueEventOnly
6de0 2c 20 73 63 72 65 65 6e 3a 20 73 63 72 65 65 6e 2c 20 74 69 6d 65 3a 20 74 69 6d 65 2c 20 74 69 ,.screen:.screen,.time:.time,.ti
6e00 6d 65 4f 66 66 73 65 74 3a 20 74 69 6d 65 4f 66 66 73 65 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 meOffset:.timeOffset);..........
6e20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 53 65 74 54 6f 75 63 }............public.void.SetTouc
6e40 68 28 69 6e 74 20 74 6f 75 63 68 49 64 2c 20 54 6f 75 63 68 50 68 61 73 65 20 70 68 61 73 65 2c h(int.touchId,.TouchPhase.phase,
6e60 20 56 65 63 74 6f 72 32 20 70 6f 73 69 74 69 6f 6e 2c 20 56 65 63 74 6f 72 32 20 64 65 6c 74 61 .Vector2.position,.Vector2.delta
6e80 20 3d 20 64 65 66 61 75 6c 74 2c 20 62 6f 6f 6c 20 71 75 65 75 65 45 76 65 6e 74 4f 6e 6c 79 20 .=.default,.bool.queueEventOnly.
6ea0 3d 20 74 72 75 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 54 6f 75 63 68 73 63 72 65 65 6e =.true,..............Touchscreen
6ec0 20 73 63 72 65 65 6e 20 3d 20 6e 75 6c 6c 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 20 3d 20 2d 31 .screen.=.null,.double.time.=.-1
6ee0 2c 20 64 6f 75 62 6c 65 20 74 69 6d 65 4f 66 66 73 65 74 20 3d 20 30 29 0d 0a 20 20 20 20 20 20 ,.double.timeOffset.=.0)........
6f00 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 63 72 65 65 6e 20 3d 3d 20 6e ..{..............if.(screen.==.n
6f20 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ull)..............{.............
6f40 20 20 20 20 20 73 63 72 65 65 6e 20 3d 20 54 6f 75 63 68 73 63 72 65 65 6e 2e 63 75 72 72 65 6e .....screen.=.Touchscreen.curren
6f60 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 63 72 65 65 6e 20 3d t;..................if.(screen.=
6f80 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 =.null)......................thr
6fa0 6f 77 20 6e 65 77 20 49 6e 76 61 6c 69 64 4f 70 65 72 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e ow.new.InvalidOperationException
6fc0 28 22 4e 6f 20 74 6f 75 63 68 73 63 72 65 65 6e 20 68 61 73 20 62 65 65 6e 20 61 64 64 65 64 22 ("No.touchscreen.has.been.added"
6fe0 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 );..............}...............
7000 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 51 75 65 75 65 53 74 61 74 65 45 76 65 6e 74 28 73 63 72 .InputSystem.QueueStateEvent(scr
7020 65 65 6e 2c 20 6e 65 77 20 54 6f 75 63 68 53 74 61 74 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 een,.new.TouchState.............
7040 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 6f 75 63 68 49 64 20 3d 20 74 6f .{..................touchId.=.to
7060 75 63 68 49 64 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 68 61 73 65 20 3d 20 uchId,..................phase.=.
7080 70 68 61 73 65 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 6f 73 69 74 69 6f 6e phase,..................position
70a0 20 3d 20 70 6f 73 69 74 69 6f 6e 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 .=.position,..................de
70c0 6c 74 61 20 3d 20 64 65 6c 74 61 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 2c 20 28 74 69 lta.=.delta,..............},.(ti
70e0 6d 65 20 3e 3d 20 30 20 3f 20 74 69 6d 65 20 3a 20 49 6e 70 75 74 52 75 6e 74 69 6d 65 2e 73 5f me.>=.0.?.time.:.InputRuntime.s_
7100 49 6e 73 74 61 6e 63 65 2e 63 75 72 72 65 6e 74 54 69 6d 65 29 20 2b 20 74 69 6d 65 4f 66 66 73 Instance.currentTime).+.timeOffs
7120 65 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 71 75 65 75 65 45 76 65 6e et);..............if.(!queueEven
7140 74 4f 6e 6c 79 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 tOnly)..................InputSys
7160 74 65 6d 2e 55 70 64 61 74 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 tem.Update();..........}........
7180 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 54 72 69 67 67 65 72 3c 54 56 61 6c 75 65 3e 28 ....public.void.Trigger<TValue>(
71a0 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 2c 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c InputAction.action,.InputControl
71c0 3c 54 56 61 6c 75 65 3e 20 63 6f 6e 74 72 6f 6c 2c 20 54 56 61 6c 75 65 20 76 61 6c 75 65 29 0d <TValue>.control,.TValue.value).
71e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 65 72 65 20 54 56 61 6c 75 65 20 3a 20 73 74 72 75 .............where.TValue.:.stru
7200 63 74 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 ct..........{..............throw
7220 20 6e 65 77 20 4e 6f 74 49 6d 70 6c 65 6d 65 6e 74 65 64 45 78 63 65 70 74 69 6f 6e 28 29 3b 0d .new.NotImplementedException();.
7240 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 .........}............///.<summa
7260 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 50 65 72 66 6f 72 6d 20 74 68 65 20 69 6e 70 ry>..........///.Perform.the.inp
7280 75 74 20 61 63 74 69 6f 6e 20 77 69 74 68 6f 75 74 20 68 61 76 69 6e 67 20 74 6f 20 6b 6e 6f 77 ut.action.without.having.to.know
72a0 20 77 68 61 74 20 69 74 20 69 73 20 62 6f 75 6e 64 20 74 6f 2e 0d 0a 20 20 20 20 20 20 20 20 2f .what.it.is.bound.to.........../
72c0 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 //.</summary>..........///.<para
72e0 6d 20 6e 61 6d 65 3d 22 61 63 74 69 6f 6e 22 3e 41 6e 20 69 6e 70 75 74 20 61 63 74 69 6f 6e 20 m.name="action">An.input.action.
7300 74 68 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 65 6e 61 62 6c 65 64 20 61 6e 64 20 68 61 that.is.currently.enabled.and.ha
7320 73 20 63 6f 6e 74 72 6f 6c 73 20 69 74 20 69 73 20 62 6f 75 6e 64 20 74 6f 2e 3c 2f 70 61 72 61 s.controls.it.is.bound.to.</para
7340 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 m>..........///.<remarks>.......
7360 20 20 20 2f 2f 2f 20 42 6c 69 6e 64 6c 79 20 74 72 69 67 67 65 72 69 6e 67 20 61 6e 20 61 63 74 ...///.Blindly.triggering.an.act
7380 69 6f 6e 20 72 65 71 75 69 72 65 73 20 6d 61 6b 69 6e 67 20 61 20 66 65 77 20 61 73 73 75 6d 70 ion.requires.making.a.few.assump
73a0 74 69 6f 6e 73 2e 20 41 63 74 69 6f 6e 73 20 61 72 65 20 6e 6f 74 20 62 75 69 6c 74 20 74 6f 20 tions..Actions.are.not.built.to.
73c0 62 65 20 61 62 6c 65 20 74 6f 20 74 72 69 67 67 65 72 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 be.able.to.trigger..........///.
73e0 77 69 74 68 6f 75 74 20 61 6e 79 20 69 6e 70 75 74 2e 20 54 68 69 73 20 6d 65 61 6e 73 20 74 68 without.any.input..This.means.th
7400 61 74 20 74 68 69 73 20 6d 65 74 68 6f 64 20 68 61 73 20 74 6f 20 67 65 6e 65 72 61 74 65 20 69 at.this.method.has.to.generate.i
7420 6e 70 75 74 20 6f 6e 20 61 20 63 6f 6e 74 72 6f 6c 20 74 68 61 74 20 74 68 65 20 61 63 74 69 6f nput.on.a.control.that.the.actio
7440 6e 20 69 73 20 62 6f 75 6e 64 20 74 6f 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 n.is.bound.to...........///.....
7460 20 20 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 74 68 61 74 20 74 68 69 73 20 6d 65 74 68 6f 64 20 68 .....///.Note.that.this.method.h
7480 61 73 20 6e 6f 20 75 6e 64 65 72 73 74 61 6e 64 69 6e 67 20 6f 66 20 74 68 65 20 69 6e 74 65 72 as.no.understanding.of.the.inter
74a0 61 63 74 69 6f 6e 73 20 74 68 61 74 20 6d 61 79 20 62 65 20 70 72 65 73 65 6e 74 20 6f 6e 20 74 actions.that.may.be.present.on.t
74c0 68 65 20 61 63 74 69 6f 6e 20 61 6e 64 20 74 68 75 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 he.action.and.thus..........///.
74e0 64 6f 65 73 20 6e 6f 74 20 6b 6e 6f 77 20 68 6f 77 20 74 68 65 79 20 6d 61 79 20 61 66 66 65 63 does.not.know.how.they.may.affec
7500 74 20 74 68 65 20 74 72 69 67 67 65 72 69 6e 67 20 6f 66 20 74 68 65 20 61 63 74 69 6f 6e 2e 0d t.the.triggering.of.the.action..
7520 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 .........///.</remarks>.........
7540 20 70 75 62 6c 69 63 20 76 6f 69 64 20 54 72 69 67 67 65 72 28 49 6e 70 75 74 41 63 74 69 6f 6e .public.void.Trigger(InputAction
7560 20 61 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .action)..........{.............
7580 20 69 66 20 28 61 63 74 69 6f 6e 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 .if.(action.==.null)............
75a0 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 ......throw.new.ArgumentNullExce
75c0 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 61 63 74 69 6f 6e 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 ption(nameof(action));..........
75e0 20 20 20 20 20 20 69 66 20 28 21 61 63 74 69 6f 6e 2e 65 6e 61 62 6c 65 64 29 0d 0a 20 20 20 20 ......if.(!action.enabled)......
7600 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 ............throw.new.ArgumentEx
7620 63 65 70 74 69 6f 6e 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 22 ception(......................$"
7640 41 63 74 69 6f 6e 20 27 7b 61 63 74 69 6f 6e 7d 27 20 6d 75 73 74 20 62 65 20 65 6e 61 62 6c 65 Action.'{action}'.must.be.enable
7660 64 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 62 65 20 61 62 6c 65 20 74 6f 20 74 72 69 67 67 65 72 d.in.order.to.be.able.to.trigger
7680 20 69 74 22 2c 20 6e 61 6d 65 6f 66 28 61 63 74 69 6f 6e 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 .it",.nameof(action));..........
76a0 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 73 20 3d 20 61 63 74 69 6f 6e 2e 63 6f 6e 74 ......var.controls.=.action.cont
76c0 72 6f 6c 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6e 74 72 6f 6c 73 2e rols;..............if.(controls.
76e0 43 6f 75 6e 74 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 Count.==.0)..................thr
7700 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 0d 0a 20 20 20 20 20 ow.new.ArgumentException(.......
7720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 22 41 63 74 69 6f 6e 20 27 7b 61 63 74 69 6f 6e ...............$"Action.'{action
7740 7d 27 20 6d 75 73 74 20 62 65 20 62 6f 75 6e 64 20 74 6f 20 63 6f 6e 74 72 6f 6c 73 20 69 6e 20 }'.must.be.bound.to.controls.in.
7760 6f 72 64 65 72 20 74 6f 20 62 65 20 61 62 6c 65 20 74 6f 20 74 72 69 67 67 65 72 20 69 74 22 2c order.to.be.able.to.trigger.it",
7780 20 6e 61 6d 65 6f 66 28 61 63 74 69 6f 6e 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .nameof(action));...............
77a0 20 2f 2f 20 53 65 65 20 69 66 20 77 65 20 68 61 76 65 20 61 20 62 75 74 74 6f 6e 20 77 65 20 63 .//.See.if.we.have.a.button.we.c
77c0 61 6e 20 74 72 69 67 67 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 an.trigger...............for.(va
77e0 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 63 6f 6e 74 72 6f 6c 73 2e 43 6f 75 6e 74 3b 20 2b 2b 69 r.i.=.0;.i.<.controls.Count;.++i
7800 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 )..............{................
7820 20 20 69 66 20 28 21 28 63 6f 6e 74 72 6f 6c 73 5b 69 5d 20 69 73 20 42 75 74 74 6f 6e 43 6f 6e ..if.(!(controls[i].is.ButtonCon
7840 74 72 6f 6c 20 62 75 74 74 6f 6e 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 trol.button))...................
7860 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...continue;....................
7880 2f 2f 20 50 72 65 73 73 20 61 6e 64 20 72 65 6c 65 61 73 65 20 62 75 74 74 6f 6e 2e 0d 0a 20 20 //.Press.and.release.button.....
78a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 28 62 75 74 74 6f 6e 2c 20 31 29 3b 0d 0a 20 ..............Set(button,.1);...
78c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 28 62 75 74 74 6f 6e 2c 20 30 29 3b 0d 0a ...............Set(button,.0);..
78e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 ..................return;.......
7900 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 65 65 20 69 .......}................//.See.i
7920 66 20 77 65 20 68 61 76 65 20 61 6e 20 61 78 69 73 20 77 65 20 63 61 6e 20 73 6c 69 64 65 20 61 f.we.have.an.axis.we.can.slide.a
7940 20 62 69 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 .bit...............for.(var.i.=.
7960 30 3b 20 69 20 3c 20 63 6f 6e 74 72 6f 6c 73 2e 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 0;.i.<.controls.Count;.++i).....
7980 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 .........{..................if.(
79a0 21 28 63 6f 6e 74 72 6f 6c 73 5b 69 5d 20 69 73 20 41 78 69 73 43 6f 6e 74 72 6f 6c 20 61 78 69 !(controls[i].is.AxisControl.axi
79c0 73 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 s))......................continu
79e0 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 64 6f 2c 20 e;....................//.We.do,.
7a00 73 6f 20 6e 75 64 67 65 20 69 74 73 20 76 61 6c 75 65 20 61 20 62 69 74 2e 0d 0a 20 20 20 20 20 so.nudge.its.value.a.bit........
7a20 20 20 20 20 20 20 20 20 20 20 20 53 65 74 28 61 78 69 73 2c 20 61 78 69 73 2e 52 65 61 64 56 61 ...........Set(axis,.axis.ReadVa
7a40 6c 75 65 28 29 20 2b 20 30 2e 30 31 66 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 lue().+.0.01f);.................
7a60 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 ...return;..............}.......
7a80 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 54 4f 44 4f 3a 20 73 75 70 70 6f 72 74 20 61 20 77 69 64 .........////TODO:.support.a.wid
7aa0 65 72 20 72 61 6e 67 65 20 6f 66 20 63 6f 6e 74 72 6f 6c 73 0d 0a 20 20 20 20 20 20 20 20 20 20 er.range.of.controls............
7ac0 20 20 74 68 72 6f 77 20 6e 65 77 20 4e 6f 74 49 6d 70 6c 65 6d 65 6e 74 65 64 45 78 63 65 70 74 ..throw.new.NotImplementedExcept
7ae0 69 6f 6e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f ion();..........}............///
7b00 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 69 6e 70 75 .<summary>..........///.The.inpu
7b20 74 20 72 75 6e 74 69 6d 65 20 75 73 65 64 20 64 75 72 69 6e 67 20 74 65 73 74 69 6e 67 2e 0d 0a t.runtime.used.during.testing...
7b40 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 ........///.</summary>..........
7b60 69 6e 74 65 72 6e 61 6c 20 49 6e 70 75 74 54 65 73 74 52 75 6e 74 69 6d 65 20 72 75 6e 74 69 6d internal.InputTestRuntime.runtim
7b80 65 20 7b 20 67 65 74 3b 20 70 72 69 76 61 74 65 20 73 65 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 20 e.{.get;.private.set;.}.........
7ba0 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 47 65 ...///.<summary>..........///.Ge
7bc0 74 20 6f 72 20 73 65 74 20 74 68 65 20 63 75 72 72 65 6e 74 20 74 69 6d 65 20 75 73 65 64 20 62 t.or.set.the.current.time.used.b
7be0 79 20 74 68 65 20 69 6e 70 75 74 20 73 79 73 74 65 6d 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f y.the.input.system...........///
7c00 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e .</summary>..........///.<value>
7c20 43 75 72 72 65 6e 74 20 74 69 6d 65 20 75 73 65 64 20 62 79 20 74 68 65 20 69 6e 70 75 74 20 73 Current.time.used.by.the.input.s
7c40 79 73 74 65 6d 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 64 ystem.</value>..........public.d
7c60 6f 75 62 6c 65 20 63 75 72 72 65 6e 74 54 69 6d 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 ouble.currentTime..........{....
7c80 20 20 20 20 20 20 20 20 20 20 67 65 74 20 3d 3e 20 72 75 6e 74 69 6d 65 2e 63 75 72 72 65 6e 74 ..........get.=>.runtime.current
7ca0 54 69 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 0d 0a 20 20 20 20 20 20 20 20 Time;..............set..........
7cc0 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 75 6e 74 69 6d 65 2e 63 ....{..................runtime.c
7ce0 75 72 72 65 6e 74 54 69 6d 65 20 3d 20 76 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 urrentTime.=.value;.............
7d00 20 20 20 20 20 72 75 6e 74 69 6d 65 2e 64 6f 6e 74 41 64 76 61 6e 63 65 54 69 6d 65 4e 65 78 74 .....runtime.dontAdvanceTimeNext
7d20 44 79 6e 61 6d 69 63 55 70 64 61 74 65 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 DynamicUpdate.=.true;...........
7d40 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 ...}..........}............publi
7d60 63 20 63 6c 61 73 73 20 41 63 74 69 6f 6e 43 6f 6e 73 74 72 61 69 6e 74 20 3a 20 43 6f 6e 73 74 c.class.ActionConstraint.:.Const
7d80 72 61 69 6e 74 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 raint..........{..............pu
7da0 62 6c 69 63 20 49 6e 70 75 74 41 63 74 69 6f 6e 50 68 61 73 65 20 70 68 61 73 65 20 7b 20 67 65 blic.InputActionPhase.phase.{.ge
7dc0 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 64 6f t;.set;.}..............public.do
7de0 75 62 6c 65 3f 20 74 69 6d 65 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 uble?.time.{.get;.set;.}........
7e00 20 20 20 20 20 20 70 75 62 6c 69 63 20 64 6f 75 62 6c 65 3f 20 64 75 72 61 74 69 6f 6e 20 7b 20 ......public.double?.duration.{.
7e20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 get;.set;.}..............public.
7e40 49 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d InputAction.action.{.get;.set;.}
7e60 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 70 75 74 43 6f 6e 74 72 6f ..............public.InputContro
7e80 6c 20 63 6f 6e 74 72 6f 6c 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 20 l.control.{.get;.set;.}.........
7ea0 20 20 20 20 20 70 75 62 6c 69 63 20 6f 62 6a 65 63 74 20 76 61 6c 75 65 20 7b 20 67 65 74 3b 20 .....public.object.value.{.get;.
7ec0 73 65 74 3b 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 54 79 70 65 20 set;.}..............public.Type.
7ee0 69 6e 74 65 72 61 63 74 69 6f 6e 20 7b 20 67 65 74 3b 20 73 65 74 3b 20 7d 0d 0a 0d 0a 20 20 20 interaction.{.get;.set;.}.......
7f00 20 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 72 65 61 64 6f 6e 6c 79 20 4c 69 73 74 3c 41 .........private.readonly.List<A
7f20 63 74 69 6f 6e 43 6f 6e 73 74 72 61 69 6e 74 3e 20 6d 5f 41 6e 64 54 68 65 6e 20 3d 20 6e 65 77 ctionConstraint>.m_AndThen.=.new
7f40 20 4c 69 73 74 3c 41 63 74 69 6f 6e 43 6f 6e 73 74 72 61 69 6e 74 3e 28 29 3b 0d 0a 0d 0a 20 20 .List<ActionConstraint>();......
7f60 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 43 6f 6e 73 74 72 61 69 6e ..........public.ActionConstrain
7f80 74 28 49 6e 70 75 74 41 63 74 69 6f 6e 50 68 61 73 65 20 70 68 61 73 65 2c 20 49 6e 70 75 74 41 t(InputActionPhase.phase,.InputA
7fa0 63 74 69 6f 6e 20 61 63 74 69 6f 6e 2c 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 72 ction.action,.InputControl.contr
7fc0 6f 6c 2c 20 6f 62 6a 65 63 74 20 76 61 6c 75 65 20 3d 20 6e 75 6c 6c 2c 20 54 79 70 65 20 69 6e ol,.object.value.=.null,.Type.in
7fe0 74 65 72 61 63 74 69 6f 6e 20 3d 20 6e 75 6c 6c 2c 20 64 6f 75 62 6c 65 3f 20 74 69 6d 65 20 3d teraction.=.null,.double?.time.=
8000 20 6e 75 6c 6c 2c 20 64 6f 75 62 6c 65 3f 20 64 75 72 61 74 69 6f 6e 20 3d 20 6e 75 6c 6c 29 0d .null,.double?.duration.=.null).
8020 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............{..................
8040 74 68 69 73 2e 70 68 61 73 65 20 3d 20 70 68 61 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 this.phase.=.phase;.............
8060 20 20 20 20 20 74 68 69 73 2e 74 69 6d 65 20 3d 20 74 69 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 .....this.time.=.time;..........
8080 20 20 20 20 20 20 20 20 74 68 69 73 2e 64 75 72 61 74 69 6f 6e 20 3d 20 64 75 72 61 74 69 6f 6e ........this.duration.=.duration
80a0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 61 63 74 69 6f 6e 20 3d ;..................this.action.=
80c0 20 61 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 2e 63 .action;..................this.c
80e0 6f 6e 74 72 6f 6c 20 3d 20 63 6f 6e 74 72 6f 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ontrol.=.control;...............
8100 20 20 20 74 68 69 73 2e 76 61 6c 75 65 20 3d 20 76 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 ...this.value.=.value;..........
8120 20 20 20 20 20 20 20 20 74 68 69 73 2e 69 6e 74 65 72 61 63 74 69 6f 6e 20 3d 20 69 6e 74 65 72 ........this.interaction.=.inter
8140 61 63 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 action;....................var.i
8160 6e 74 65 72 61 63 74 69 6f 6e 54 65 78 74 20 3d 20 73 74 72 69 6e 67 2e 45 6d 70 74 79 3b 0d 0a nteractionText.=.string.Empty;..
8180 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 6e 74 65 72 61 63 74 69 6f 6e 20 ................if.(interaction.
81a0 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e !=.null)......................in
81c0 74 65 72 61 63 74 69 6f 6e 54 65 78 74 20 3d 20 49 6e 70 75 74 49 6e 74 65 72 61 63 74 69 6f 6e teractionText.=.InputInteraction
81e0 2e 47 65 74 44 69 73 70 6c 61 79 4e 61 6d 65 28 69 6e 74 65 72 61 63 74 69 6f 6e 29 3b 0d 0a 0d .GetDisplayName(interaction);...
8200 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 63 74 69 6f 6e 4e 61 6d 65 20 .................var.actionName.
8220 3d 20 61 63 74 69 6f 6e 2e 61 63 74 69 6f 6e 4d 61 70 20 21 3d 20 6e 75 6c 6c 20 3f 20 24 22 7b =.action.actionMap.!=.null.?.$"{
8240 61 63 74 69 6f 6e 2e 61 63 74 69 6f 6e 4d 61 70 7d 2f 7b 61 63 74 69 6f 6e 2e 6e 61 6d 65 7d 22 action.actionMap}/{action.name}"
8260 20 3a 20 61 63 74 69 6f 6e 2e 6e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .:.action.name;.................
8280 20 2f 2f 20 55 73 65 20 73 61 6d 65 20 74 65 78 74 20 66 6f 72 6d 61 74 20 61 73 20 49 6e 70 75 .//.Use.same.text.format.as.Inpu
82a0 74 41 63 74 69 6f 6e 54 72 61 63 65 20 66 6f 72 20 65 61 73 69 65 72 20 63 6f 6d 70 61 72 69 73 tActionTrace.for.easier.comparis
82c0 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 64 65 73 63 72 69 70 on...................var.descrip
82e0 74 69 6f 6e 20 3d 20 24 22 7b 7b 20 61 63 74 69 6f 6e 3d 7b 61 63 74 69 6f 6e 4e 61 6d 65 7d 20 tion.=.$"{{.action={actionName}.
8300 70 68 61 73 65 3d 7b 70 68 61 73 65 7d 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 phase={phase}";.................
8320 20 69 66 20 28 74 69 6d 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .if.(time.!=.null)..............
8340 20 20 20 20 20 20 20 20 64 65 73 63 72 69 70 74 69 6f 6e 20 2b 3d 20 24 22 20 74 69 6d 65 3d 7b ........description.+=.$".time={
8360 74 69 6d 65 7d 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6e time}";..................if.(con
8380 74 72 6f 6c 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 trol.!=.null)...................
83a0 20 20 20 64 65 73 63 72 69 70 74 69 6f 6e 20 2b 3d 20 24 22 20 63 6f 6e 74 72 6f 6c 3d 7b 63 6f ...description.+=.$".control={co
83c0 6e 74 72 6f 6c 7d 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 ntrol}";..................if.(va
83e0 6c 75 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 lue.!=.null)....................
8400 20 20 64 65 73 63 72 69 70 74 69 6f 6e 20 2b 3d 20 24 22 20 76 61 6c 75 65 3d 7b 76 61 6c 75 65 ..description.+=.$".value={value
8420 7d 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 6e 74 65 72 61 63 }";..................if.(interac
8440 74 69 6f 6e 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tion.!=.null)...................
8460 20 20 20 64 65 73 63 72 69 70 74 69 6f 6e 20 2b 3d 20 24 22 20 69 6e 74 65 72 61 63 74 69 6f 6e ...description.+=.$".interaction
8480 3d 7b 69 6e 74 65 72 61 63 74 69 6f 6e 54 65 78 74 7d 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 ={interactionText}";............
84a0 20 20 20 20 20 20 69 66 20 28 64 75 72 61 74 69 6f 6e 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 ......if.(duration.!=.null).....
84c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 73 63 72 69 70 74 69 6f 6e 20 2b 3d 20 .................description.+=.
84e0 24 22 20 64 75 72 61 74 69 6f 6e 3d 7b 64 75 72 61 74 69 6f 6e 7d 22 3b 0d 0a 20 20 20 20 20 20 $".duration={duration}";........
8500 20 20 20 20 20 20 20 20 20 20 64 65 73 63 72 69 70 74 69 6f 6e 20 2b 3d 20 22 20 7d 22 3b 0d 0a ..........description.+=.".}";..
8520 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 64 65 ................Description.=.de
8540 73 63 72 69 70 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 scription;..............}.......
8560 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 6f 76 65 72 72 69 64 65 20 43 6f 6e 73 74 72 61 .........public.override.Constra
8580 69 6e 74 52 65 73 75 6c 74 20 41 70 70 6c 79 54 6f 28 6f 62 6a 65 63 74 20 61 63 74 75 61 6c 29 intResult.ApplyTo(object.actual)
85a0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..............{.................
85c0 20 76 61 72 20 74 72 61 63 65 20 3d 20 28 49 6e 70 75 74 41 63 74 69 6f 6e 54 72 61 63 65 29 61 .var.trace.=.(InputActionTrace)a
85e0 63 74 75 61 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 63 74 69 ctual;..................var.acti
8600 6f 6e 73 20 3d 20 74 72 61 63 65 2e 54 6f 41 72 72 61 79 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 ons.=.trace.ToArray();..........
8620 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 73 2e 4c 65 6e 67 74 68 20 3d 3d 20 ..........if.(actions.Length.==.
8640 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 0)......................return.n
8660 65 77 20 43 6f 6e 73 74 72 61 69 6e 74 52 65 73 75 6c 74 28 74 68 69 73 2c 20 61 63 74 75 61 6c ew.ConstraintResult(this,.actual
8680 2c 20 66 61 6c 73 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 ,.false);....................if.
86a0 28 21 56 65 72 69 66 79 28 61 63 74 69 6f 6e 73 5b 30 5d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 (!Verify(actions[0]))...........
86c0 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 43 6f 6e 73 74 72 61 69 6e 74 ...........return.new.Constraint
86e0 52 65 73 75 6c 74 28 74 68 69 73 2c 20 61 63 74 75 61 6c 2c 20 66 61 6c 73 65 29 3b 0d 0a 0d 0a Result(this,.actual,.false);....
8700 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 20 3d 20 31 3b 0d 0a 20 20 20 20 ................var.i.=.1;......
8720 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 63 6f 6e 73 74 72 61 ............foreach.(var.constra
8740 69 6e 74 20 69 6e 20 6d 5f 41 6e 64 54 68 65 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 int.in.m_AndThen)...............
8760 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 20 ...{......................if.(i.
8780 3e 3d 20 61 63 74 69 6f 6e 73 2e 4c 65 6e 67 74 68 20 7c 7c 20 21 63 6f 6e 73 74 72 61 69 6e 74 >=.actions.Length.||.!constraint
87a0 2e 56 65 72 69 66 79 28 61 63 74 69 6f 6e 73 5b 69 5d 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 .Verify(actions[i]))............
87c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 43 6f 6e 73 74 72 61 ..............return.new.Constra
87e0 69 6e 74 52 65 73 75 6c 74 28 74 68 69 73 2c 20 61 63 74 75 61 6c 2c 20 66 61 6c 73 65 29 3b 0d intResult(this,.actual,.false);.
8800 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 69 3b 0d 0a 20 20 20 20 20 .....................++i;.......
8820 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ...........}....................
8840 69 66 20 28 69 20 21 3d 20 61 63 74 69 6f 6e 73 2e 4c 65 6e 67 74 68 29 0d 0a 20 20 20 20 20 20 if.(i.!=.actions.Length)........
8860 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 43 6f 6e 73 74 72 61 ..............return.new.Constra
8880 69 6e 74 52 65 73 75 6c 74 28 74 68 69 73 2c 20 61 63 74 75 61 6c 2c 20 66 61 6c 73 65 29 3b 0d intResult(this,.actual,.false);.
88a0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 43 6f ...................return.new.Co
88c0 6e 73 74 72 61 69 6e 74 52 65 73 75 6c 74 28 74 68 69 73 2c 20 61 63 74 75 61 6c 2c 20 74 72 75 nstraintResult(this,.actual,.tru
88e0 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 e);..............}..............
8900 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 56 65 72 69 66 79 28 49 6e 70 75 74 41 63 74 69 6f ..private.bool.Verify(InputActio
8920 6e 54 72 61 63 65 2e 41 63 74 69 6f 6e 45 76 65 6e 74 50 74 72 20 65 76 65 6e 74 50 74 72 29 0d nTrace.ActionEventPtr.eventPtr).
8940 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .............{..................
8960 2f 2f 20 4e 4f 54 45 3a 20 55 73 69 6e 67 20 65 78 70 6c 69 63 69 74 20 22 72 65 74 75 72 6e 20 //.NOTE:.Using.explicit."return.
8980 66 61 6c 73 65 22 20 62 72 61 6e 63 68 65 73 20 65 76 65 72 79 77 68 65 72 65 20 66 6f 72 20 65 false".branches.everywhere.for.e
89a0 61 73 69 65 72 20 73 65 74 74 69 6e 67 20 6f 66 20 62 72 65 61 6b 70 6f 69 6e 74 73 2e 0d 0a 0d asier.setting.of.breakpoints....
89c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 65 76 65 6e 74 50 74 72 2e 61 63 .................if.(eventPtr.ac
89e0 74 69 6f 6e 20 21 3d 20 61 63 74 69 6f 6e 20 7c 7c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 tion.!=.action.||...............
8a00 20 20 20 20 20 20 20 65 76 65 6e 74 50 74 72 2e 70 68 61 73 65 20 21 3d 20 70 68 61 73 65 29 0d .......eventPtr.phase.!=.phase).
8a20 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 .....................return.fals
8a40 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 74 e;....................//.Check.t
8a60 69 6d 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 69 6d 65 20 21 ime...................if.(time.!
8a80 3d 20 6e 75 6c 6c 20 26 26 20 21 4d 61 74 68 66 2e 41 70 70 72 6f 78 69 6d 61 74 65 6c 79 28 28 =.null.&&.!Mathf.Approximately((
8aa0 66 6c 6f 61 74 29 74 69 6d 65 2e 56 61 6c 75 65 2c 20 28 66 6c 6f 61 74 29 65 76 65 6e 74 50 74 float)time.Value,.(float)eventPt
8ac0 72 2e 74 69 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 r.time))......................re
8ae0 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f turn.false;..................../
8b00 2f 20 43 68 65 63 6b 20 64 75 72 61 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 /.Check.duration................
8b20 20 20 20 69 66 20 28 64 75 72 61 74 69 6f 6e 20 21 3d 20 6e 75 6c 6c 20 26 26 20 21 4d 61 74 68 ...if.(duration.!=.null.&&.!Math
8b40 66 2e 41 70 70 72 6f 78 69 6d 61 74 65 6c 79 28 28 66 6c 6f 61 74 29 64 75 72 61 74 69 6f 6e 2e f.Approximately((float)duration.
8b60 56 61 6c 75 65 2c 20 28 66 6c 6f 61 74 29 65 76 65 6e 74 50 74 72 2e 64 75 72 61 74 69 6f 6e 29 Value,.(float)eventPtr.duration)
8b80 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 )......................return.fa
8ba0 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b lse;....................//.Check
8bc0 20 63 6f 6e 74 72 6f 6c 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 .control...................if.(c
8be0 6f 6e 74 72 6f 6c 20 21 3d 20 6e 75 6c 6c 20 26 26 20 65 76 65 6e 74 50 74 72 2e 63 6f 6e 74 72 ontrol.!=.null.&&.eventPtr.contr
8c00 6f 6c 20 21 3d 20 63 6f 6e 74 72 6f 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ol.!=.control)..................
8c20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ....return.false;...............
8c40 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 69 6e 74 65 72 61 63 74 69 6f 6e 2e 0d 0a 20 20 20 20 .....//.Check.interaction.......
8c60 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 6e 74 65 72 61 63 74 69 6f 6e 20 21 3d 20 6e ............if.(interaction.!=.n
8c80 75 6c 6c 20 26 26 20 28 65 76 65 6e 74 50 74 72 2e 69 6e 74 65 72 61 63 74 69 6f 6e 20 3d 3d 20 ull.&&.(eventPtr.interaction.==.
8ca0 6e 75 6c 6c 20 7c 7c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 null.||.........................
8cc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 21 69 6e 74 65 72 61 63 74 69 6f .....................!interactio
8ce0 6e 2e 49 73 49 6e 73 74 61 6e 63 65 4f 66 54 79 70 65 28 65 76 65 6e 74 50 74 72 2e 69 6e 74 65 n.IsInstanceOfType(eventPtr.inte
8d00 72 61 63 74 69 6f 6e 29 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 raction)))......................
8d20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 return.false;...................
8d40 20 2f 2f 20 43 68 65 63 6b 20 76 61 6c 75 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .//.Check.value.................
8d60 20 20 69 66 20 28 76 61 6c 75 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 ..if.(value.!=.null)............
8d80 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 ......{......................var
8da0 20 76 61 6c 20 3d 20 65 76 65 6e 74 50 74 72 2e 52 65 61 64 56 61 6c 75 65 41 73 4f 62 6a 65 63 .val.=.eventPtr.ReadValueAsObjec
8dc0 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 t();......................if.(va
8de0 6c 75 65 20 69 73 20 66 6c 6f 61 74 20 66 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 lue.is.float.f).................
8e00 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .....{..........................
8e20 69 66 20 28 21 4d 61 74 68 66 2e 41 70 70 72 6f 78 69 6d 61 74 65 6c 79 28 66 2c 20 43 6f 6e 76 if.(!Mathf.Approximately(f,.Conv
8e40 65 72 74 2e 54 6f 53 69 6e 67 6c 65 28 76 61 6c 29 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ert.ToSingle(val))).............
8e60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a .................return.false;..
8e80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 ....................}...........
8ea0 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 76 61 6c 75 65 20 69 73 20 64 6f 75 ...........else.if.(value.is.dou
8ec0 62 6c 65 20 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 ble.d)......................{...
8ee0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 4d 61 74 68 .......................if.(!Math
8f00 66 2e 41 70 70 72 6f 78 69 6d 61 74 65 6c 79 28 28 66 6c 6f 61 74 29 64 2c 20 28 66 6c 6f 61 74 f.Approximately((float)d,.(float
8f20 29 43 6f 6e 76 65 72 74 2e 54 6f 44 6f 75 62 6c 65 28 76 61 6c 29 29 29 0d 0a 20 20 20 20 20 20 )Convert.ToDouble(val)))........
8f40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c ......................return.fal
8f60 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 se;......................}......
8f80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 76 61 6c 75 65 20 69 ................else.if.(value.i
8fa0 73 20 56 65 63 74 6f 72 32 20 76 32 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 s.Vector2.v2)...................
8fc0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 ...{..........................if
8fe0 20 28 21 56 65 63 74 6f 72 32 45 71 75 61 6c 69 74 79 43 6f 6d 70 61 72 65 72 2e 49 6e 73 74 61 .(!Vector2EqualityComparer.Insta
9000 6e 63 65 2e 45 71 75 61 6c 73 28 76 32 2c 20 28 56 65 63 74 6f 72 32 29 76 61 6c 29 29 0d 0a 20 nce.Equals(v2,.(Vector2)val))...
9020 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 ...........................retur
9040 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d n.false;......................}.
9060 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 76 61 .....................else.if.(va
9080 6c 75 65 20 69 73 20 56 65 63 74 6f 72 33 20 76 33 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 lue.is.Vector3.v3)..............
90a0 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ........{.......................
90c0 20 20 20 69 66 20 28 21 56 65 63 74 6f 72 33 45 71 75 61 6c 69 74 79 43 6f 6d 70 61 72 65 72 2e ...if.(!Vector3EqualityComparer.
90e0 49 6e 73 74 61 6e 63 65 2e 45 71 75 61 6c 73 28 76 33 2c 20 28 56 65 63 74 6f 72 33 29 76 61 6c Instance.Equals(v3,.(Vector3)val
9100 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ))..............................
9120 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 return.false;...................
9140 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 ...}......................else.i
9160 66 20 28 21 76 61 6c 75 65 2e 45 71 75 61 6c 73 28 76 61 6c 29 29 0d 0a 20 20 20 20 20 20 20 20 f.(!value.Equals(val))..........
9180 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 ................return.false;...
91a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ...............}................
91c0 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d ....return.true;..............}.
91e0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 43 6f 6e 73 ...............public.ActionCons
9200 74 72 61 69 6e 74 20 41 6e 64 54 68 65 6e 28 41 63 74 69 6f 6e 43 6f 6e 73 74 72 61 69 6e 74 20 traint.AndThen(ActionConstraint.
9220 63 6f 6e 73 74 72 61 69 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 constraint)..............{......
9240 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 6e 64 54 68 65 6e 2e 41 64 64 28 63 6f 6e 73 74 72 ............m_AndThen.Add(constr
9260 61 69 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 73 63 72 69 70 74 aint);..................Descript
9280 69 6f 6e 20 2b 3d 20 22 20 61 6e 64 5c 6e 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ion.+=.".and\n";................
92a0 20 20 44 65 73 63 72 69 70 74 69 6f 6e 20 2b 3d 20 63 6f 6e 73 74 72 61 69 6e 74 2e 44 65 73 63 ..Description.+=.constraint.Desc
92c0 72 69 70 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e ription;..................return
92e0 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d .this;..............}..........}
9300 0d 0a 0d 0a 20 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0d 0a 20 20 ............#if.UNITY_EDITOR....
9320 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 76 6f 69 64 20 53 69 6d 75 6c 61 74 65 44 6f 6d 61 ......internal.void.SimulateDoma
9340 69 6e 52 65 6c 6f 61 64 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 inReload()..........{...........
9360 20 20 20 2f 2f 20 54 68 69 73 20 71 75 69 74 65 20 69 6e 76 61 73 69 76 65 6c 79 20 67 6f 65 73 ...//.This.quite.invasively.goes
9380 20 69 6e 74 6f 20 49 6e 70 75 74 53 79 73 74 65 6d 20 69 6e 74 65 72 6e 61 6c 73 2e 20 55 6e 66 .into.InputSystem.internals..Unf
93a0 6f 72 74 75 6e 61 74 65 6c 79 2c 20 77 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 68 ortunately,.we..............//.h
93c0 61 76 65 20 6e 6f 20 70 72 6f 70 65 72 20 77 61 79 20 6f 66 20 73 69 6d 75 6c 61 74 69 6e 67 20 ave.no.proper.way.of.simulating.
93e0 64 6f 6d 61 69 6e 20 72 65 6c 6f 61 64 73 20 41 54 4d 2e 20 53 6f 20 77 65 20 64 69 72 65 63 74 domain.reloads.ATM..So.we.direct
9400 6c 79 20 63 61 6c 6c 20 76 61 72 69 6f 75 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 ly.call.various..............//.
9420 69 6e 74 65 72 6e 61 6c 20 6d 65 74 68 6f 64 73 20 68 65 72 65 20 69 6e 20 61 20 73 65 71 75 65 internal.methods.here.in.a.seque
9440 6e 63 65 20 73 69 6d 69 6c 61 72 20 74 6f 20 77 68 61 74 20 77 65 27 64 20 67 65 74 20 64 75 72 nce.similar.to.what.we'd.get.dur
9460 69 6e 67 20 61 20 64 6f 6d 61 69 6e 20 72 65 6c 6f 61 64 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ing.a.domain.reload.............
9480 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 73 5f 53 79 73 74 65 6d 4f 62 6a 65 63 74 2e 4f ....InputSystem.s_SystemObject.O
94a0 6e 42 65 66 6f 72 65 53 65 72 69 61 6c 69 7a 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 nBeforeSerialize();.............
94c0 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 73 5f 53 79 73 74 65 6d 4f 62 6a 65 63 74 20 3d 20 6e 75 .InputSystem.s_SystemObject.=.nu
94e0 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 49 6e 69 ll;..............InputSystem.Ini
9500 74 69 61 6c 69 7a 65 49 6e 45 64 69 74 6f 72 28 72 75 6e 74 69 6d 65 29 3b 0d 0a 20 20 20 20 20 tializeInEditor(runtime);.......
9520 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 23 65 6e 64 69 66 0d 0a 20 20 20 20 7d 0d 0a 7d ...}............#endif......}..}
9540 0d 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 00 00 00 49 6e 70 75 ............................Inpu
9560 74 54 65 73 74 46 69 78 74 75 72 65 17 00 00 00 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 tTestFixture....UnityEngine.Inpu
9580 74 53 79 73 74 65 6d 00 tSystem.