summaryrefslogtreecommitdiff
path: root/Library/Artifacts/7a/7afb04eb2acd99cc852d7a3c3bd447b9
blob: 4754d944643c84f687a919bbdb96ac2db0842a7c (plain)
ofshex dumpascii
0000 00 00 0f 81 00 00 b5 28 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 c8 a4 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 0b 00 00 00 54 6f 75 63 68 73 63 72 65 65 6e 00 49 a4 00 00 75 73 69 6e ............Touchscreen.I...usin
10a0 67 20 53 79 73 74 65 6d 3b 0d 0a 75 73 69 6e 67 20 53 79 73 74 65 6d 2e 52 75 6e 74 69 6d 65 2e g.System;..using.System.Runtime.
10c0 49 6e 74 65 72 6f 70 53 65 72 76 69 63 65 73 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 2e 43 6f InteropServices;..using.Unity.Co
10e0 6c 6c 65 63 74 69 6f 6e 73 2e 4c 6f 77 4c 65 76 65 6c 2e 55 6e 73 61 66 65 3b 0d 0a 75 73 69 6e llections.LowLevel.Unsafe;..usin
1100 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 43 6f 6e 74 72 6f g.UnityEngine.InputSystem.Contro
1120 6c 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 ls;..using.UnityEngine.InputSyst
1140 65 6d 2e 4c 61 79 6f 75 74 73 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 em.Layouts;..using.UnityEngine.I
1160 6e 70 75 74 53 79 73 74 65 6d 2e 4c 6f 77 4c 65 76 65 6c 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 nputSystem.LowLevel;..using.Unit
1180 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 55 74 69 6c 69 74 69 65 73 3b 0d 0a yEngine.InputSystem.Utilities;..
11a0 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 50 72 6f 66 69 6c 69 6e 67 3b 0d 0a 0d 0a using.UnityEngine.Profiling;....
11c0 2f 2f 2f 2f 54 4f 44 4f 3a 20 70 72 6f 70 65 72 74 79 20 74 68 61 74 20 74 65 6c 6c 73 20 77 68 ////TODO:.property.that.tells.wh
11e0 65 74 68 65 72 20 61 20 54 6f 75 63 68 73 63 72 65 65 6e 20 69 73 20 6d 75 6c 74 69 2d 74 6f 75 ether.a.Touchscreen.is.multi-tou
1200 63 68 20 63 61 70 61 62 6c 65 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 70 72 6f 70 65 72 74 79 ch.capable....////TODO:.property
1220 20 74 68 61 74 20 74 65 6c 6c 73 20 77 68 65 74 68 65 72 20 61 20 54 6f 75 63 68 73 63 72 65 65 .that.tells.whether.a.Touchscree
1240 6e 20 73 75 70 70 6f 72 74 73 20 70 72 65 73 73 75 72 65 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a n.supports.pressure....////TODO:
1260 20 61 64 64 20 73 75 70 70 6f 72 74 20 66 6f 72 20 73 63 72 65 65 6e 20 6f 72 69 65 6e 74 61 74 .add.support.for.screen.orientat
1280 69 6f 6e 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 74 6f 75 63 68 20 69 73 20 68 61 72 64 77 69 ion....////TODO:.touch.is.hardwi
12a0 72 65 64 20 74 6f 20 63 65 72 74 61 69 6e 20 6d 65 6d 6f 72 79 20 6c 61 79 6f 75 74 73 20 41 54 red.to.certain.memory.layouts.AT
12c0 4d 3b 20 65 69 74 68 65 72 20 61 6c 6c 6f 77 20 66 6c 65 78 69 62 69 6c 69 74 79 20 6f 72 20 6d M;.either.allow.flexibility.or.m
12e0 61 6b 65 20 73 75 72 65 20 74 68 65 20 6c 61 79 6f 75 74 73 20 63 61 6e 6e 6f 74 20 62 65 20 63 ake.sure.the.layouts.cannot.be.c
1300 68 61 6e 67 65 64 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 73 74 61 72 74 54 69 6d 65 73 20 61 hanged....////TODO:.startTimes.a
1320 72 65 20 62 61 6b 65 64 20 2a 65 78 74 65 72 6e 61 6c 2a 20 74 69 6d 65 73 3b 20 72 65 73 65 74 re.baked.*external*.times;.reset
1340 20 74 6f 75 63 68 20 77 68 65 6e 20 63 6f 6d 69 6e 67 20 6f 75 74 20 6f 66 20 70 6c 61 79 20 6d .touch.when.coming.out.of.play.m
1360 6f 64 65 0d 0a 0d 0a 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 77 68 65 72 65 20 73 68 6f 75 6c 64 20 ode....////REVIEW:.where.should.
1380 77 65 20 70 75 74 20 68 61 6e 64 73 65 74 20 76 69 62 72 61 74 69 6f 6e 20 73 75 70 70 6f 72 74 we.put.handset.vibration.support
13a0 3f 20 73 68 6f 75 6c 64 20 74 68 61 74 20 73 69 74 20 6f 6e 20 74 68 65 20 74 6f 75 63 68 73 63 ?.should.that.sit.on.the.touchsc
13c0 72 65 65 6e 20 63 6c 61 73 73 3f 20 62 65 20 69 74 73 20 6f 77 6e 20 73 65 70 61 72 61 74 65 20 reen.class?.be.its.own.separate.
13e0 64 65 76 69 63 65 3f 0d 0a 0d 0a 6e 61 6d 65 73 70 61 63 65 20 55 6e 69 74 79 45 6e 67 69 6e 65 device?....namespace.UnityEngine
1400 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 4c 6f 77 4c 65 76 65 6c 0d 0a 7b 0d 0a 20 20 20 20 5b 53 .InputSystem.LowLevel..{......[S
1420 79 73 74 65 6d 2e 44 69 61 67 6e 6f 73 74 69 63 73 2e 43 6f 64 65 41 6e 61 6c 79 73 69 73 2e 53 ystem.Diagnostics.CodeAnalysis.S
1440 75 70 70 72 65 73 73 4d 65 73 73 61 67 65 28 22 4d 69 63 72 6f 73 6f 66 74 2e 44 65 73 69 67 6e uppressMessage("Microsoft.Design
1460 22 2c 20 22 43 41 31 30 32 38 3a 45 6e 75 6d 53 74 6f 72 61 67 65 53 68 6f 75 6c 64 42 65 49 6e ",."CA1028:EnumStorageShouldBeIn
1480 74 33 32 22 2c 20 4a 75 73 74 69 66 69 63 61 74 69 6f 6e 20 3d 20 22 62 79 74 65 20 74 6f 20 63 t32",.Justification.=."byte.to.c
14a0 6f 72 72 65 73 70 6f 6e 64 20 74 6f 20 54 6f 75 63 68 53 74 61 74 65 20 6c 61 79 6f 75 74 2e 22 orrespond.to.TouchState.layout."
14c0 29 5d 0d 0a 20 20 20 20 5b 46 6c 61 67 73 5d 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 65 6e )]......[Flags]......internal.en
14e0 75 6d 20 54 6f 75 63 68 46 6c 61 67 73 20 3a 20 62 79 74 65 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 um.TouchFlags.:.byte......{.....
1500 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 4c 65 61 76 69 6e 67 20 74 68 65 20 66 69 72 73 74 20 .....//.NOTE:.Leaving.the.first.
1520 34 20 62 69 74 73 20 66 6f 72 20 6e 61 74 69 76 65 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 49 6e 4.bits.for.native.............In
1540 64 69 72 65 63 74 54 6f 75 63 68 20 3d 20 31 20 3c 3c 20 30 2c 0d 0a 20 20 20 20 20 20 20 20 50 directTouch.=.1.<<.0,..........P
1560 72 69 6d 61 72 79 54 6f 75 63 68 20 3d 20 31 20 3c 3c 20 34 2c 0d 0a 20 20 20 20 20 20 20 20 54 rimaryTouch.=.1.<<.4,..........T
1580 61 70 20 3d 20 31 20 3c 3c 20 35 2c 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 49 6e 64 69 63 ap.=.1.<<.5,............//.Indic
15a0 61 74 65 73 20 74 68 61 74 20 74 68 65 20 74 6f 75 63 68 20 74 68 61 74 20 65 73 74 61 62 6c 69 ates.that.the.touch.that.establi
15c0 73 68 65 64 20 74 68 69 73 20 70 72 69 6d 61 72 79 20 74 6f 75 63 68 20 68 61 73 20 65 6e 64 65 shed.this.primary.touch.has.ende
15e0 64 20 62 75 74 20 74 68 61 74 20 77 68 65 6e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 69 74 20 64 d.but.that.when..........//.it.d
1600 69 64 2c 20 74 68 65 72 65 20 77 65 72 65 20 73 74 69 6c 6c 20 6f 74 68 65 72 20 74 6f 75 63 68 id,.there.were.still.other.touch
1620 65 73 20 67 6f 69 6e 67 20 6f 6e 2e 20 57 65 20 65 6e 64 20 74 68 65 20 70 72 69 6d 61 72 79 20 es.going.on..We.end.the.primary.
1640 74 6f 75 63 68 20 77 68 65 6e 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 6c 61 73 74 20 touch.when.the..........//.last.
1660 74 6f 75 63 68 20 6c 65 61 76 65 73 20 74 68 65 20 73 63 72 65 65 6e 2e 0d 0a 20 20 20 20 20 20 touch.leaves.the.screen.........
1680 20 20 4f 72 70 68 61 6e 65 64 50 72 69 6d 61 72 79 54 6f 75 63 68 20 3d 20 31 20 3c 3c 20 36 2c ..OrphanedPrimaryTouch.=.1.<<.6,
16a0 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 61 64 64 20 74 ......}........////REVIEW:.add.t
16c0 69 6d 65 73 74 61 6d 70 20 64 69 72 65 63 74 6c 79 20 74 6f 20 74 6f 75 63 68 3f 0d 0a 20 20 20 imestamp.directly.to.touch?.....
16e0 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 53 74 61 74 65 20 6c 61 .///.<summary>......///.State.la
1700 79 6f 75 74 20 66 6f 72 20 61 20 73 69 6e 67 6c 65 20 74 6f 75 63 68 2e 0d 0a 20 20 20 20 2f 2f yout.for.a.single.touch.......//
1720 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d /.</summary>......///.<remarks>.
1740 0a 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 69 73 20 74 68 65 20 6c 6f 77 2d 6c 65 76 65 6c 20 6d .....///.This.is.the.low-level.m
1760 65 6d 6f 72 79 20 72 65 70 72 65 73 65 6e 74 61 74 69 6f 6e 20 6f 66 20 61 20 73 69 6e 67 6c 65 emory.representation.of.a.single
1780 20 74 6f 75 63 68 2c 20 69 2e 65 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f 20 77 61 79 20 74 6f 75 .touch,.i.e.the......///.way.tou
17a0 63 68 65 73 20 61 72 65 20 69 6e 74 65 72 6e 61 6c 6c 79 20 74 72 61 6e 73 6d 69 74 74 65 64 20 ches.are.internally.transmitted.
17c0 61 6e 64 20 73 74 6f 72 65 64 20 69 6e 20 74 68 65 20 73 79 73 74 65 6d 2e 20 54 6f 20 75 70 64 and.stored.in.the.system..To.upd
17e0 61 74 65 0d 0a 20 20 20 20 2f 2f 2f 20 74 6f 75 63 68 65 73 20 6f 6e 20 61 20 3c 73 65 65 20 63 ate......///.touches.on.a.<see.c
1800 72 65 66 3d 22 54 6f 75 63 68 73 63 72 65 65 6e 22 2f 3e 2c 20 3c 73 65 65 20 63 72 65 66 3d 22 ref="Touchscreen"/>,.<see.cref="
1820 53 74 61 74 65 45 76 65 6e 74 22 2f 3e 73 20 63 6f 6e 74 61 69 6e 69 6e 67 0d 0a 20 20 20 20 2f StateEvent"/>s.containing....../
1840 2f 2f 20 54 6f 75 63 68 53 74 61 74 65 73 20 61 72 65 20 73 65 6e 74 20 74 6f 20 74 68 65 20 73 //.TouchStates.are.sent.to.the.s
1860 63 72 65 65 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 creen.......///.</remarks>......
1880 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 22 ///.<seealso.cref="TouchControl"
18a0 2f 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 54 6f 75 63 68 />......///.<seealso.cref="Touch
18c0 73 63 72 65 65 6e 22 2f 3e 0d 0a 20 20 20 20 2f 2f 20 49 4d 50 4f 52 54 41 4e 54 3a 20 4d 75 73 screen"/>......//.IMPORTANT:.Mus
18e0 74 20 6d 61 74 63 68 20 54 6f 75 63 68 49 6e 70 75 74 53 74 61 74 65 20 69 6e 20 6e 61 74 69 76 t.match.TouchInputState.in.nativ
1900 65 20 63 6f 64 65 2e 0d 0a 20 20 20 20 5b 53 74 72 75 63 74 4c 61 79 6f 75 74 28 4c 61 79 6f 75 e.code.......[StructLayout(Layou
1920 74 4b 69 6e 64 2e 45 78 70 6c 69 63 69 74 2c 20 53 69 7a 65 20 3d 20 6b 53 69 7a 65 49 6e 42 79 tKind.Explicit,.Size.=.kSizeInBy
1940 74 65 73 29 5d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 75 63 74 20 54 6f 75 63 68 53 74 tes)]......public.struct.TouchSt
1960 61 74 65 20 3a 20 49 49 6e 70 75 74 53 74 61 74 65 54 79 70 65 49 6e 66 6f 0d 0a 20 20 20 20 7b ate.:.IInputStateTypeInfo......{
1980 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 63 6f 6e 73 74 20 69 6e 74 20 6b 53 69 ..........internal.const.int.kSi
19a0 7a 65 49 6e 42 79 74 65 73 20 3d 20 35 36 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c zeInBytes.=.56;............///.<
19c0 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4d 65 6d 6f 72 79 20 66 6f 72 summary>..........///.Memory.for
19e0 6d 61 74 20 74 61 67 20 66 6f 72 20 54 6f 75 63 68 53 74 61 74 65 2e 0d 0a 20 20 20 20 20 20 20 mat.tag.for.TouchState..........
1a00 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 76 61 .///.</summary>..........///.<va
1a20 6c 75 65 3e 52 65 74 75 72 6e 73 20 22 54 4f 55 43 22 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 lue>Returns."TOUC".</value>.....
1a40 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 53 74 61 .....///.<seealso.cref="InputSta
1a60 74 65 42 6c 6f 63 6b 2e 66 6f 72 6d 61 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 teBlock.format"/>..........publi
1a80 63 20 73 74 61 74 69 63 20 46 6f 75 72 43 43 20 46 6f 72 6d 61 74 20 3d 3e 20 6e 65 77 20 46 6f c.static.FourCC.Format.=>.new.Fo
1aa0 75 72 43 43 28 27 54 27 2c 20 27 4f 27 2c 20 27 55 27 2c 20 27 43 27 29 3b 0d 0a 0d 0a 20 20 20 urCC('T',.'O',.'U',.'C');.......
1ac0 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 20 20 20 2f 2f 2f 20 .....///.<summary>..........///.
1ae0 4e 75 6d 65 72 69 63 20 49 44 20 6f 66 20 74 68 65 20 74 6f 75 63 68 2e 0d 0a 20 20 20 20 20 20 Numeric.ID.of.the.touch.........
1b00 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 2f 2f 2f 20 3c 76 ..///.</summary>..........///.<v
1b20 61 6c 75 65 3e 4e 75 6d 65 72 69 63 20 49 44 20 6f 66 20 74 68 65 20 74 6f 75 63 68 2e 3c 2f 76 alue>Numeric.ID.of.the.touch.</v
1b40 61 6c 75 65 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 alue>..........///.<remarks>....
1b60 20 20 20 20 20 20 2f 2f 2f 20 57 68 69 6c 65 20 61 20 74 6f 75 63 68 20 69 73 20 6f 6e 67 6f 69 ......///.While.a.touch.is.ongoi
1b80 6e 67 2c 20 69 74 20 6d 75 73 74 20 68 61 76 65 20 61 20 6e 6f 6e 2d 7a 65 72 6f 20 49 44 20 64 ng,.it.must.have.a.non-zero.ID.d
1ba0 69 66 66 65 72 65 6e 74 20 66 72 6f 6d 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 6c 6c 20 6f ifferent.from..........///.all.o
1bc0 74 68 65 72 20 6f 6e 67 6f 69 6e 67 20 74 6f 75 63 68 65 73 2e 20 53 74 61 72 74 69 6e 67 20 77 ther.ongoing.touches..Starting.w
1be0 69 74 68 20 3c 73 65 65 20 63 72 65 66 3d 22 54 6f 75 63 68 50 68 61 73 65 2e 42 65 67 61 6e 22 ith.<see.cref="TouchPhase.Began"
1c00 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 6e 64 20 65 6e 64 69 6e 67 20 77 69 74 68 20 />..........///.and.ending.with.
1c20 3c 73 65 65 20 63 72 65 66 3d 22 54 6f 75 63 68 50 68 61 73 65 2e 45 6e 64 65 64 22 2f 3e 20 6f <see.cref="TouchPhase.Ended"/>.o
1c40 72 20 3c 73 65 65 20 63 72 65 66 3d 22 54 6f 75 63 68 50 68 61 73 65 2e 43 61 6e 63 65 6c 65 64 r.<see.cref="TouchPhase.Canceled
1c60 22 2f 3e 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 20 74 6f 75 63 68 20 69 73 20 69 64 65 "/>,..........///.a.touch.is.ide
1c80 6e 74 69 66 69 65 64 20 62 79 20 69 74 73 20 49 44 2c 20 69 2e 65 2e 20 61 20 54 6f 75 63 68 53 ntified.by.its.ID,.i.e..a.TouchS
1ca0 74 61 74 65 20 77 69 74 68 20 74 68 65 20 73 61 6d 65 20 49 44 0d 0a 20 20 20 20 20 20 20 20 2f tate.with.the.same.ID........../
1cc0 2f 2f 20 62 65 6c 6f 6e 67 73 20 74 6f 20 74 68 65 20 73 61 6d 65 20 74 6f 75 63 68 2e 0d 0a 20 //.belongs.to.the.same.touch....
1ce0 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 66 74 65 72 20 61 20 .......///..........///.After.a.
1d00 74 6f 75 63 68 20 68 61 73 20 65 6e 64 65 64 20 6f 72 20 62 65 65 6e 20 63 61 6e 63 65 6c 65 64 touch.has.ended.or.been.canceled
1d20 2c 20 61 6e 20 49 44 20 63 61 6e 20 62 65 20 72 65 75 73 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 ,.an.ID.can.be.reused...........
1d40 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 ///.</remarks>..........///.<see
1d60 61 6c 73 6f 20 63 72 65 66 3d 22 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 2e 74 6f 75 63 68 49 64 22 also.cref="TouchControl.touchId"
1d80 2f 3e 0d 0a 20 20 20 20 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 28 64 69 73 70 6c 61 />..........[InputControl(displa
1da0 79 4e 61 6d 65 20 3d 20 22 54 6f 75 63 68 20 49 44 22 2c 20 6c 61 79 6f 75 74 20 3d 20 22 49 6e yName.=."Touch.ID",.layout.=."In
1dc0 74 65 67 65 72 22 2c 20 73 79 6e 74 68 65 74 69 63 20 3d 20 74 72 75 65 29 5d 0d 0a 20 20 20 20 teger",.synthetic.=.true)]......
1de0 20 20 20 20 5b 46 69 65 6c 64 4f 66 66 73 65 74 28 30 29 5d 0d 0a 20 20 20 20 20 20 20 20 70 75 ....[FieldOffset(0)]..........pu
1e00 62 6c 69 63 20 69 6e 74 20 74 6f 75 63 68 49 64 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f blic.int.touchId;............///
1e20 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 63 72 65 65 6e 2d 73 .<summary>..........///.Screen-s
1e40 70 61 63 65 20 70 6f 73 69 74 69 6f 6e 20 6f 66 20 74 68 65 20 74 6f 75 63 68 20 69 6e 20 70 69 pace.position.of.the.touch.in.pi
1e60 78 65 6c 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 20 xels...........///.</summary>...
1e80 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 53 63 72 65 65 6e 2d 73 70 61 63 65 20 70 .......///.<value>Screen-space.p
1ea0 6f 73 69 74 69 6f 6e 20 6f 66 20 74 68 65 20 74 6f 75 63 68 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 osition.of.the.touch.</value>...
1ec0 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 54 6f 75 63 68 43 .......///.<seealso.cref="TouchC
1ee0 6f 6e 74 72 6f 6c 2e 70 6f 73 69 74 69 6f 6e 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 5b 49 6e 70 ontrol.position"/>..........[Inp
1f00 75 74 43 6f 6e 74 72 6f 6c 28 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 22 50 6f 73 69 74 69 6f utControl(displayName.=."Positio
1f20 6e 22 29 5d 0d 0a 20 20 20 20 20 20 20 20 5b 46 69 65 6c 64 4f 66 66 73 65 74 28 34 29 5d 0d 0a n")]..........[FieldOffset(4)]..
1f40 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 56 65 63 74 6f 72 32 20 70 6f 73 69 74 69 6f 6e 3b ........public.Vector2.position;
1f60 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>.......
1f80 20 20 20 2f 2f 2f 20 53 63 72 65 65 6e 2d 73 70 61 63 65 20 6d 6f 74 69 6f 6e 20 64 65 6c 74 61 ...///.Screen-space.motion.delta
1fa0 20 6f 66 20 74 68 65 20 74 6f 75 63 68 20 69 6e 20 70 69 78 65 6c 73 2e 0d 0a 20 20 20 20 20 20 .of.the.touch.in.pixels.........
1fc0 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 2f 2f 2f 20 3c 76 ..///.</summary>..........///.<v
1fe0 61 6c 75 65 3e 53 63 72 65 65 6e 2d 73 70 61 63 65 20 6d 6f 76 65 6d 65 6e 74 20 64 65 6c 74 61 alue>Screen-space.movement.delta
2000 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 .</value>..........///.<seealso.
2020 63 72 65 66 3d 22 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 2e 64 65 6c 74 61 22 2f 3e 0d 0a 20 20 20 cref="TouchControl.delta"/>.....
2040 20 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 28 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d .....[InputControl(displayName.=
2060 20 22 44 65 6c 74 61 22 29 5d 0d 0a 20 20 20 20 20 20 20 20 5b 46 69 65 6c 64 4f 66 66 73 65 74 ."Delta")]..........[FieldOffset
2080 28 31 32 29 5d 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 56 65 63 74 6f 72 32 20 64 65 (12)]..........public.Vector2.de
20a0 6c 74 61 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 0a 20 lta;............///.<summary>...
20c0 20 20 20 20 20 20 20 2f 2f 2f 20 50 72 65 73 73 75 72 65 2d 6c 65 76 65 6c 20 6f 66 20 74 68 65 .......///.Pressure-level.of.the
20e0 20 74 6f 75 63 68 20 61 67 61 69 6e 73 74 20 74 68 65 20 74 6f 75 63 68 73 63 72 65 65 6e 2e 0d .touch.against.the.touchscreen..
2100 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 20 20 20 20 20 20 .........///.</summary>.........
2120 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 50 72 65 73 73 75 72 65 20 6f 66 20 74 6f 75 63 68 2e 3c 2f .///.<value>Pressure.of.touch.</
2140 76 61 6c 75 65 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 value>..........///.<remarks>...
2160 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 63 6f 72 65 20 72 61 6e 67 65 20 66 6f 72 20 74 68 .......///.The.core.range.for.th
2180 69 73 20 76 61 6c 75 65 20 69 73 20 5b 30 2e 2e 31 5d 20 77 69 74 68 20 31 20 69 6e 64 69 63 61 is.value.is.[0..1].with.1.indica
21a0 74 69 6e 67 20 6d 61 78 69 6d 75 6d 20 70 72 65 73 73 75 72 65 2e 20 4e 6f 74 65 2c 20 68 6f 77 ting.maximum.pressure..Note,.how
21c0 65 76 65 72 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 61 74 20 74 68 65 20 61 63 74 75 ever,..........///.that.the.actu
21e0 61 6c 20 76 61 6c 75 65 20 6d 61 79 20 67 6f 20 62 65 79 6f 6e 64 20 31 20 69 6e 20 70 72 61 63 al.value.may.go.beyond.1.in.prac
2200 74 69 63 65 2e 20 54 68 69 73 20 69 73 20 62 65 63 61 75 73 65 20 74 68 65 20 73 79 73 74 65 6d tice..This.is.because.the.system
2220 20 77 69 6c 6c 20 75 73 75 61 6c 6c 79 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 64 65 66 69 6e .will.usually..........///.defin
2240 65 20 22 6d 61 78 69 6d 75 6d 20 70 72 65 73 73 75 72 65 22 20 74 6f 20 62 65 20 6c 65 73 73 20 e."maximum.pressure".to.be.less.
2260 74 68 61 6e 20 74 68 65 20 70 68 79 73 69 63 61 6c 20 6d 61 78 69 6d 75 6d 20 6c 69 6d 69 74 20 than.the.physical.maximum.limit.
2280 74 68 65 20 68 61 72 64 77 61 72 65 20 69 73 20 63 61 70 61 62 6c 65 0d 0a 20 20 20 20 20 20 20 the.hardware.is.capable.........
22a0 20 2f 2f 2f 20 6f 66 20 72 65 70 6f 72 74 69 6e 67 20 73 6f 20 74 68 61 74 20 74 6f 20 61 63 68 .///.of.reporting.so.that.to.ach
22c0 69 65 76 65 20 6d 61 78 69 6d 75 6d 20 70 72 65 73 73 75 72 65 2c 20 6f 6e 65 20 64 6f 65 73 20 ieve.maximum.pressure,.one.does.
22e0 6e 6f 74 20 6e 65 65 64 20 74 6f 20 70 72 65 73 73 20 61 73 20 68 61 72 64 20 61 73 0d 0a 20 20 not.need.to.press.as.hard.as....
2300 20 20 20 20 20 20 2f 2f 2f 20 70 6f 73 73 69 62 6c 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f ......///.possible...........///
2320 20 3c 2f 72 65 6d 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 .</remarks>..........///.<seeals
2340 6f 20 63 72 65 66 3d 22 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 2e 70 72 65 73 73 75 72 65 22 2f 3e o.cref="TouchControl.pressure"/>
2360 0d 0a 20 20 20 20 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 28 64 69 73 70 6c 61 79 4e ..........[InputControl(displayN
2380 61 6d 65 20 3d 20 22 50 72 65 73 73 75 72 65 22 2c 20 6c 61 79 6f 75 74 20 3d 20 22 41 78 69 73 ame.=."Pressure",.layout.=."Axis
23a0 22 29 5d 0d 0a 20 20 20 20 20 20 20 20 5b 46 69 65 6c 64 4f 66 66 73 65 74 28 32 30 29 5d 0d 0a ")]..........[FieldOffset(20)]..
23c0 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 66 6c 6f 61 74 20 70 72 65 73 73 75 72 65 3b 0d 0a ........public.float.pressure;..
23e0 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 20 20 ..........///.<summary>.........
2400 20 2f 2f 2f 20 52 61 64 69 75 73 20 6f 66 20 74 68 65 20 74 6f 75 63 68 20 70 72 69 6e 74 20 6f .///.Radius.of.the.touch.print.o
2420 6e 20 74 68 65 20 73 75 72 66 61 63 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 n.the.surface...........///.</su
2440 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 54 6f 75 63 68 mmary>..........///.<value>Touch
2460 20 65 78 74 65 6e 74 73 20 68 6f 72 69 7a 6f 6e 74 61 6c 6c 79 20 61 6e 64 20 76 65 72 74 69 63 .extents.horizontally.and.vertic
2480 61 6c 6c 79 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 ally.</value>..........///.<rema
24a0 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 74 6f 75 63 68 20 72 61 64 69 rks>..........///.The.touch.radi
24c0 75 73 20 69 73 20 67 69 76 65 6e 20 69 6e 20 73 63 72 65 65 6e 2d 73 70 61 63 65 20 70 69 78 65 us.is.given.in.screen-space.pixe
24e0 6c 20 63 6f 6f 72 64 69 6e 61 74 65 73 20 61 6c 6f 6e 67 20 58 20 61 6e 64 20 59 20 63 65 6e 74 l.coordinates.along.X.and.Y.cent
2500 65 72 65 64 20 69 6e 20 74 68 65 20 6d 69 64 64 6c 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 ered.in.the.middle..........///.
2520 6f 66 20 74 68 65 20 74 6f 75 63 68 2e 20 4e 6f 74 65 20 74 68 61 74 20 6e 6f 74 20 61 6c 6c 20 of.the.touch..Note.that.not.all.
2540 73 63 72 65 65 6e 73 20 61 6e 64 20 73 79 73 74 65 6d 73 20 73 75 70 70 6f 72 74 20 72 61 64 69 screens.and.systems.support.radi
2560 75 73 20 64 65 74 65 63 74 69 6f 6e 20 6f 6e 20 74 6f 75 63 68 65 73 20 73 6f 20 74 68 69 73 0d us.detection.on.touches.so.this.
2580 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 76 61 6c 75 65 20 6d 61 79 20 62 65 20 61 74 20 3c 63 3e .........///.value.may.be.at.<c>
25a0 64 65 66 61 75 6c 74 3c 2f 63 3e 20 66 6f 72 20 61 6e 20 6f 74 68 65 72 77 69 73 65 20 70 65 72 default</c>.for.an.otherwise.per
25c0 66 65 63 74 6c 79 20 76 61 6c 69 64 20 74 6f 75 63 68 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f fectly.valid.touch...........///
25e0 20 3c 2f 72 65 6d 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 .</remarks>..........///.<seeals
2600 6f 20 63 72 65 66 3d 22 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 2e 72 61 64 69 75 73 22 2f 3e 0d 0a o.cref="TouchControl.radius"/>..
2620 20 20 20 20 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 28 64 69 73 70 6c 61 79 4e 61 6d ........[InputControl(displayNam
2640 65 20 3d 20 22 52 61 64 69 75 73 22 29 5d 0d 0a 20 20 20 20 20 20 20 20 5b 46 69 65 6c 64 4f 66 e.=."Radius")]..........[FieldOf
2660 66 73 65 74 28 32 34 29 5d 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 56 65 63 74 6f 72 fset(24)]..........public.Vector
2680 32 20 72 61 64 69 75 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 2.radius;............///.<summar
26a0 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 54 6f 75 63 68 y>..........///.<see.cref="Touch
26c0 50 68 61 73 65 22 2f 3e 20 76 61 6c 75 65 20 6f 66 20 74 68 65 20 74 6f 75 63 68 2e 0d 0a 20 20 Phase"/>.value.of.the.touch.....
26e0 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 2f 2f ......///.</summary>..........//
2700 2f 20 3c 76 61 6c 75 65 3e 43 75 72 72 65 6e 74 20 3c 73 65 65 20 63 72 65 66 3d 22 54 6f 75 63 /.<value>Current.<see.cref="Touc
2720 68 50 68 61 73 65 22 2f 3e 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 hPhase"/>.</value>..........///.
2740 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 70 68 61 73 65 22 2f 3e 0d 0a 20 20 20 20 20 20 20 <seealso.cref="phase"/>.........
2760 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 28 6e 61 6d 65 20 3d 20 22 70 68 61 73 65 22 2c 20 64 .[InputControl(name.=."phase",.d
2780 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 22 54 6f 75 63 68 20 50 68 61 73 65 22 2c 20 6c 61 79 6f isplayName.=."Touch.Phase",.layo
27a0 75 74 20 3d 20 22 54 6f 75 63 68 50 68 61 73 65 22 2c 20 73 79 6e 74 68 65 74 69 63 20 3d 20 74 ut.=."TouchPhase",.synthetic.=.t
27c0 72 75 65 29 5d 0d 0a 20 20 20 20 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 28 6e 61 6d rue)]..........[InputControl(nam
27e0 65 20 3d 20 22 70 72 65 73 73 22 2c 20 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 22 54 6f 75 63 e.=."press",.displayName.=."Touc
2800 68 20 43 6f 6e 74 61 63 74 3f 22 2c 20 6c 61 79 6f 75 74 20 3d 20 22 54 6f 75 63 68 50 72 65 73 h.Contact?",.layout.=."TouchPres
2820 73 22 2c 20 75 73 65 53 74 61 74 65 46 72 6f 6d 20 3d 20 22 70 68 61 73 65 22 29 5d 0d 0a 20 20 s",.useStateFrom.=."phase")]....
2840 20 20 20 20 20 20 5b 46 69 65 6c 64 4f 66 66 73 65 74 28 33 32 29 5d 0d 0a 20 20 20 20 20 20 20 ......[FieldOffset(32)].........
2860 20 70 75 62 6c 69 63 20 62 79 74 65 20 70 68 61 73 65 49 64 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 .public.byte.phaseId;...........
2880 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 28 6e 61 6d 65 20 3d 20 22 74 61 70 43 6f 75 6e 74 22 .[InputControl(name.=."tapCount"
28a0 2c 20 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 22 54 61 70 20 43 6f 75 6e 74 22 2c 20 6c 61 79 ,.displayName.=."Tap.Count",.lay
28c0 6f 75 74 20 3d 20 22 49 6e 74 65 67 65 72 22 29 5d 0d 0a 20 20 20 20 20 20 20 20 5b 46 69 65 6c out.=."Integer")]..........[Fiel
28e0 64 4f 66 66 73 65 74 28 33 33 29 5d 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 79 74 dOffset(33)]..........public.byt
2900 65 20 74 61 70 43 6f 75 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 4e 6f 74 20 63 75 e.tapCount;............//.Not.cu
2920 72 72 65 6e 74 6c 79 20 75 73 65 64 2c 20 62 75 74 20 73 74 69 6c 6c 20 6e 65 65 64 65 64 20 69 rrently.used,.but.still.needed.i
2940 6e 20 74 68 69 73 20 73 74 72 75 63 74 20 66 6f 72 20 70 61 64 64 69 6e 67 2c 0d 0a 20 20 20 20 n.this.struct.for.padding,......
2960 20 20 20 20 2f 2f 20 61 73 20 69 6c 32 63 70 70 20 64 6f 65 73 20 6e 6f 74 20 69 6d 70 6c 65 6d ....//.as.il2cpp.does.not.implem
2980 65 6e 74 20 46 69 65 6c 64 4f 66 66 73 65 74 2e 0d 0a 20 20 20 20 20 20 20 20 5b 46 69 65 6c 64 ent.FieldOffset...........[Field
29a0 4f 66 66 73 65 74 28 33 34 29 5d 0d 0a 20 20 20 20 20 20 20 20 62 79 74 65 20 64 69 73 70 6c 61 Offset(34)]..........byte.displa
29c0 79 49 6e 64 65 78 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c yIndex;............[InputControl
29e0 28 6e 61 6d 65 20 3d 20 22 69 6e 64 69 72 65 63 74 54 6f 75 63 68 22 2c 20 64 69 73 70 6c 61 79 (name.=."indirectTouch",.display
2a00 4e 61 6d 65 20 3d 20 22 49 6e 64 69 72 65 63 74 20 54 6f 75 63 68 3f 22 2c 20 6c 61 79 6f 75 74 Name.=."Indirect.Touch?",.layout
2a20 20 3d 20 22 42 75 74 74 6f 6e 22 2c 20 62 69 74 20 3d 20 30 2c 20 73 79 6e 74 68 65 74 69 63 20 .=."Button",.bit.=.0,.synthetic.
2a40 3d 20 74 72 75 65 29 5d 0d 0a 20 20 20 20 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 28 =.true)]..........[InputControl(
2a60 6e 61 6d 65 20 3d 20 22 74 61 70 22 2c 20 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 22 54 61 70 name.=."tap",.displayName.=."Tap
2a80 22 2c 20 6c 61 79 6f 75 74 20 3d 20 22 42 75 74 74 6f 6e 22 2c 20 62 69 74 20 3d 20 35 29 5d 0d ",.layout.=."Button",.bit.=.5)].
2aa0 0a 20 20 20 20 20 20 20 20 5b 46 69 65 6c 64 4f 66 66 73 65 74 28 33 35 29 5d 0d 0a 20 20 20 20 .........[FieldOffset(35)]......
2ac0 20 20 20 20 70 75 62 6c 69 63 20 62 79 74 65 20 66 6c 61 67 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 ....public.byte.flags;..........
2ae0 20 20 2f 2f 20 57 61 73 74 69 6e 67 20 66 6f 75 72 20 62 79 74 65 73 20 69 6e 20 74 68 65 20 6e ..//.Wasting.four.bytes.in.the.n
2b00 61 6d 65 20 6f 66 20 61 6c 69 67 6e 6d 65 6e 74 20 68 65 72 65 2e 20 4e 65 65 64 20 74 68 65 20 ame.of.alignment.here..Need.the.
2b20 65 78 70 6c 69 63 69 74 20 66 69 65 6c 64 73 20 61 73 20 69 6c 32 63 70 70 20 64 6f 65 73 6e 27 explicit.fields.as.il2cpp.doesn'
2b40 74 20 72 65 73 70 65 63 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 74 68 65 20 65 78 70 6c 69 63 t.respect..........//.the.explic
2b60 69 74 20 66 69 65 6c 64 20 6f 66 66 73 65 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 5b 46 69 65 6c it.field.offsets...........[Fiel
2b80 64 4f 66 66 73 65 74 28 33 36 29 5d 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 69 dOffset(36)]..........internal.i
2ba0 6e 74 20 70 61 64 64 69 6e 67 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 nt.padding;............//.NOTE:.
2bc0 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 64 61 74 61 20 69 73 20 4e 4f 54 20 73 65 6e 74 20 62 The.following.data.is.NOT.sent.b
2be0 79 20 6e 61 74 69 76 65 20 62 75 74 20 72 61 74 68 65 72 20 64 61 74 61 20 77 65 20 61 64 64 20 y.native.but.rather.data.we.add.
2c00 6f 6e 20 74 68 65 20 6d 61 6e 61 67 65 64 20 73 69 64 65 20 74 6f 20 65 61 63 68 20 74 6f 75 63 on.the.managed.side.to.each.touc
2c20 68 2e 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 h.............///.<summary>.....
2c40 20 20 20 20 20 2f 2f 2f 20 54 69 6d 65 20 74 68 61 74 20 74 68 65 20 74 6f 75 63 68 20 77 61 73 .....///.Time.that.the.touch.was
2c60 20 73 74 61 72 74 65 64 2e 20 52 65 6c 61 74 69 76 65 20 74 6f 20 3c 63 3e 54 69 6d 65 2e 72 65 .started..Relative.to.<c>Time.re
2c80 61 6c 54 69 6d 65 53 69 6e 63 65 53 74 61 72 74 75 70 3c 2f 63 3e 2e 0d 0a 20 20 20 20 20 20 20 alTimeSinceStartup</c>..........
2ca0 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 76 61 .///.</summary>..........///.<va
2cc0 6c 75 65 3e 54 69 6d 65 20 74 68 61 74 20 74 68 65 20 74 6f 75 63 68 20 77 61 73 20 73 74 61 72 lue>Time.that.the.touch.was.star
2ce0 74 65 64 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 ted.</value>..........///.<remar
2d00 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 69 73 20 73 65 74 20 61 75 74 ks>..........///.This.is.set.aut
2d20 6f 6d 61 74 69 63 61 6c 6c 79 20 62 79 20 3c 73 65 65 20 63 72 65 66 3d 22 54 6f 75 63 68 73 63 omatically.by.<see.cref="Touchsc
2d40 72 65 65 6e 22 2f 3e 20 61 6e 64 20 64 6f 65 73 20 6e 6f 74 20 6e 65 65 64 20 74 6f 20 62 65 20 reen"/>.and.does.not.need.to.be.
2d60 70 72 6f 76 69 64 65 64 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 62 79 20 65 76 65 6e 74 73 20 provided..........///.by.events.
2d80 73 65 6e 74 20 74 6f 20 74 68 65 20 74 6f 75 63 68 73 63 72 65 65 6e 2e 0d 0a 20 20 20 20 20 20 sent.to.the.touchscreen.........
2da0 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 20 2f 2f 2f 20 3c 73 ..///.</remarks>..........///.<s
2dc0 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 45 76 65 6e 74 2e 74 69 6d 65 22 2f 3e 0d eealso.cref="InputEvent.time"/>.
2de0 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 3d 22 54 6f 75 63 .........///.<seealso.cref="Touc
2e00 68 43 6f 6e 74 72 6f 6c 2e 73 74 61 72 74 54 69 6d 65 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 5b hControl.startTime"/>..........[
2e20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 28 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 22 53 74 61 72 InputControl(displayName.=."Star
2e40 74 20 54 69 6d 65 22 2c 20 6c 61 79 6f 75 74 20 20 3d 20 22 44 6f 75 62 6c 65 22 2c 20 73 79 6e t.Time",.layout..=."Double",.syn
2e60 74 68 65 74 69 63 20 3d 20 74 72 75 65 29 5d 0d 0a 20 20 20 20 20 20 20 20 5b 46 69 65 6c 64 4f thetic.=.true)]..........[FieldO
2e80 66 66 73 65 74 28 34 30 29 5d 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 64 6f 75 62 6c ffset(40)]..........public.doubl
2ea0 65 20 73 74 61 72 74 54 69 6d 65 3b 20 2f 2f 20 49 6e 20 2a 65 78 74 65 72 6e 61 6c 2a 20 74 69 e.startTime;.//.In.*external*.ti
2ec0 6d 65 2c 20 69 2e 65 2e 20 63 75 72 72 65 6e 74 54 69 6d 65 4f 66 66 73 65 74 54 6f 52 65 61 6c me,.i.e..currentTimeOffsetToReal
2ee0 74 69 6d 65 53 69 6e 63 65 53 74 61 72 74 75 70 20 62 61 6b 65 64 20 69 6e 2e 0d 0a 0d 0a 20 20 timeSinceStartup.baked.in.......
2f00 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 20 20 20 2f 2f 2f ......///.<summary>..........///
2f20 20 54 68 65 20 70 6f 73 69 74 69 6f 6e 20 77 68 65 72 65 20 74 68 65 20 74 6f 75 63 68 20 73 74 .The.position.where.the.touch.st
2f40 61 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 arted...........///.</summary>..
2f60 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 53 63 72 65 65 6e 2d 73 70 61 63 65 20 ........///.<value>Screen-space.
2f80 73 74 61 72 74 20 70 6f 73 69 74 69 6f 6e 20 6f 66 20 74 68 65 20 74 6f 75 63 68 2e 3c 2f 76 61 start.position.of.the.touch.</va
2fa0 6c 75 65 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 lue>..........///.<remarks>.....
2fc0 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 69 73 20 73 65 74 20 61 75 74 6f 6d 61 74 69 63 61 6c .....///.This.is.set.automatical
2fe0 6c 79 20 62 79 20 3c 73 65 65 20 63 72 65 66 3d 22 54 6f 75 63 68 73 63 72 65 65 6e 22 2f 3e 20 ly.by.<see.cref="Touchscreen"/>.
3000 61 6e 64 20 64 6f 65 73 20 6e 6f 74 20 6e 65 65 64 20 74 6f 20 62 65 20 70 72 6f 76 69 64 65 64 and.does.not.need.to.be.provided
3020 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 62 79 20 65 76 65 6e 74 73 20 73 65 6e 74 20 74 6f 20 ..........///.by.events.sent.to.
3040 74 68 65 20 74 6f 75 63 68 73 63 72 65 65 6e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f the.touchscreen...........///.</
3060 72 65 6d 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 remarks>..........///.<seealso.c
3080 72 65 66 3d 22 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 2e 73 74 61 72 74 50 6f 73 69 74 69 6f 6e 22 ref="TouchControl.startPosition"
30a0 2f 3e 0d 0a 20 20 20 20 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 28 64 69 73 70 6c 61 />..........[InputControl(displa
30c0 79 4e 61 6d 65 20 3d 20 22 53 74 61 72 74 20 50 6f 73 69 74 69 6f 6e 22 2c 20 73 79 6e 74 68 65 yName.=."Start.Position",.synthe
30e0 74 69 63 20 3d 20 74 72 75 65 29 5d 0d 0a 20 20 20 20 20 20 20 20 5b 46 69 65 6c 64 4f 66 66 73 tic.=.true)]..........[FieldOffs
3100 65 74 28 34 38 29 5d 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 56 65 63 74 6f 72 32 20 et(48)]..........public.Vector2.
3120 73 74 61 72 74 50 6f 73 69 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 startPosition;............///.<s
3140 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 47 65 74 20 6f 72 20 73 65 74 20 ummary>..........///.Get.or.set.
3160 74 68 65 20 70 68 61 73 65 20 6f 66 20 74 68 65 20 74 6f 75 63 68 2e 0d 0a 20 20 20 20 20 20 20 the.phase.of.the.touch..........
3180 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 76 61 .///.</summary>..........///.<va
31a0 6c 75 65 3e 50 68 61 73 65 20 6f 66 20 74 68 65 20 74 6f 75 63 68 2e 3c 2f 76 61 6c 75 65 3e 0d lue>Phase.of.the.touch.</value>.
31c0 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 3d 22 54 6f 75 63 .........///.<seealso.cref="Touc
31e0 68 43 6f 6e 74 72 6f 6c 2e 70 68 61 73 65 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 hControl.phase"/>..........publi
3200 63 20 54 6f 75 63 68 50 68 61 73 65 20 70 68 61 73 65 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 c.TouchPhase.phase..........{...
3220 20 20 20 20 20 20 20 20 20 20 20 67 65 74 20 3d 3e 20 28 54 6f 75 63 68 50 68 61 73 65 29 70 68 ...........get.=>.(TouchPhase)ph
3240 61 73 65 49 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 20 3d 3e 20 70 68 61 73 65 aseId;..............set.=>.phase
3260 49 64 20 3d 20 28 62 79 74 65 29 76 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a Id.=.(byte)value;..........}....
3280 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 69 73 4e 6f 6e 65 45 6e 64 65 64 4f ........public.bool.isNoneEndedO
32a0 72 43 61 6e 63 65 6c 65 64 20 3d 3e 20 70 68 61 73 65 20 3d 3d 20 54 6f 75 63 68 50 68 61 73 65 rCanceled.=>.phase.==.TouchPhase
32c0 2e 4e 6f 6e 65 20 7c 7c 20 70 68 61 73 65 20 3d 3d 20 54 6f 75 63 68 50 68 61 73 65 2e 45 6e 64 .None.||.phase.==.TouchPhase.End
32e0 65 64 20 7c 7c 0d 0a 20 20 20 20 20 20 20 20 70 68 61 73 65 20 3d 3d 20 54 6f 75 63 68 50 68 61 ed.||..........phase.==.TouchPha
3300 73 65 2e 43 61 6e 63 65 6c 65 64 3b 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f se.Canceled;..........public.boo
3320 6c 20 69 73 49 6e 50 72 6f 67 72 65 73 73 20 3d 3e 20 70 68 61 73 65 20 3d 3d 20 54 6f 75 63 68 l.isInProgress.=>.phase.==.Touch
3340 50 68 61 73 65 2e 42 65 67 61 6e 20 7c 7c 20 70 68 61 73 65 20 3d 3d 20 54 6f 75 63 68 50 68 61 Phase.Began.||.phase.==.TouchPha
3360 73 65 2e 4d 6f 76 65 64 20 7c 7c 0d 0a 20 20 20 20 20 20 20 20 70 68 61 73 65 20 3d 3d 20 54 6f se.Moved.||..........phase.==.To
3380 75 63 68 50 68 61 73 65 2e 53 74 61 74 69 6f 6e 61 72 79 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 uchPhase.Stationary;............
33a0 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 57 68 65 74 68 ///.<summary>..........///.Wheth
33c0 65 72 20 20 54 4f 44 4f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e er..TODO..........///.</summary>
33e0 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 57 68 65 74 68 65 72 20 74 68 65 ..........///.<value>Whether.the
3400 20 74 6f 75 63 68 20 69 73 20 74 68 65 20 66 69 72 73 74 20 54 4f 44 4f 3c 2f 76 61 6c 75 65 3e .touch.is.the.first.TODO</value>
3420 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 20 20 ..........///.<remarks>.........
3440 20 2f 2f 2f 20 54 68 69 73 20 66 6c 61 67 20 77 69 6c 6c 20 62 65 20 73 65 74 20 69 6e 74 65 72 .///.This.flag.will.be.set.inter
3460 6e 61 6c 6c 79 20 62 79 20 3c 73 65 65 20 63 72 65 66 3d 22 54 6f 75 63 68 73 63 72 65 65 6e 22 nally.by.<see.cref="Touchscreen"
3480 2f 3e 2e 20 47 65 6e 65 72 61 6c 6c 79 2c 20 69 74 20 69 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f />..Generally,.it.is..........//
34a0 2f 20 6e 6f 74 20 6e 65 63 65 73 73 61 72 79 20 74 6f 20 73 65 74 20 74 68 69 73 20 62 69 74 20 /.not.necessary.to.set.this.bit.
34c0 6d 61 6e 75 61 6c 6c 79 20 77 68 65 6e 20 66 65 65 64 69 6e 67 20 64 61 74 61 20 74 6f 20 54 6f manually.when.feeding.data.to.To
34e0 75 63 68 73 63 72 65 65 6e 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 uchscreens...........///.</remar
3500 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 69 73 50 72 69 6d 61 ks>..........public.bool.isPrima
3520 72 79 54 6f 75 63 68 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 ryTouch..........{..............
3540 67 65 74 20 3d 3e 20 28 66 6c 61 67 73 20 26 20 28 62 79 74 65 29 54 6f 75 63 68 46 6c 61 67 73 get.=>.(flags.&.(byte)TouchFlags
3560 2e 50 72 69 6d 61 72 79 54 6f 75 63 68 29 20 21 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 .PrimaryTouch).!=.0;............
3580 20 20 73 65 74 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 ..set..............{............
35a0 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ......if.(value)................
35c0 20 20 20 20 20 20 66 6c 61 67 73 20 7c 3d 20 28 62 79 74 65 29 54 6f 75 63 68 46 6c 61 67 73 2e ......flags.|=.(byte)TouchFlags.
35e0 50 72 69 6d 61 72 79 54 6f 75 63 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 PrimaryTouch;..................e
3600 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 61 67 73 20 26 lse......................flags.&
3620 3d 20 28 62 79 74 65 29 7e 54 6f 75 63 68 46 6c 61 67 73 2e 50 72 69 6d 61 72 79 54 6f 75 63 68 =.(byte)~TouchFlags.PrimaryTouch
3640 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 0d 0a 0d 0a 20 ;..............}..........}.....
3660 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 62 6f 6f 6c 20 69 73 4f 72 70 68 61 6e 65 64 50 .......internal.bool.isOrphanedP
3680 72 69 6d 61 72 79 54 6f 75 63 68 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 rimaryTouch..........{..........
36a0 20 20 20 20 67 65 74 20 3d 3e 20 28 66 6c 61 67 73 20 26 20 28 62 79 74 65 29 54 6f 75 63 68 46 ....get.=>.(flags.&.(byte)TouchF
36c0 6c 61 67 73 2e 4f 72 70 68 61 6e 65 64 50 72 69 6d 61 72 79 54 6f 75 63 68 29 20 21 3d 20 30 3b lags.OrphanedPrimaryTouch).!=.0;
36e0 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 20 20 20 20 7b ..............set..............{
3700 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 29 0d 0a 20 20 ..................if.(value)....
3720 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 61 67 73 20 7c 3d 20 28 62 79 74 65 ..................flags.|=.(byte
3740 29 54 6f 75 63 68 46 6c 61 67 73 2e 4f 72 70 68 61 6e 65 64 50 72 69 6d 61 72 79 54 6f 75 63 68 )TouchFlags.OrphanedPrimaryTouch
3760 3b 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 ;..................else.........
3780 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 61 67 73 20 26 3d 20 28 62 79 74 65 29 7e 54 6f 75 .............flags.&=.(byte)~Tou
37a0 63 68 46 6c 61 67 73 2e 4f 72 70 68 61 6e 65 64 50 72 69 6d 61 72 79 54 6f 75 63 68 3b 0d 0a 20 chFlags.OrphanedPrimaryTouch;...
37c0 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 ...........}..........}.........
37e0 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 69 73 49 6e 64 69 72 65 63 74 54 6f 75 63 68 0d 0a ...public.bool.isIndirectTouch..
3800 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 20 3d 3e 20 28 66 ........{..............get.=>.(f
3820 6c 61 67 73 20 26 20 28 62 79 74 65 29 54 6f 75 63 68 46 6c 61 67 73 2e 49 6e 64 69 72 65 63 74 lags.&.(byte)TouchFlags.Indirect
3840 54 6f 75 63 68 29 20 21 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 0d 0a 20 Touch).!=.0;..............set...
3860 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 69 66 ...........{..................if
3880 20 28 76 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c .(value)......................fl
38a0 61 67 73 20 7c 3d 20 28 62 79 74 65 29 54 6f 75 63 68 46 6c 61 67 73 2e 49 6e 64 69 72 65 63 74 ags.|=.(byte)TouchFlags.Indirect
38c0 54 6f 75 63 68 3b 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 Touch;..................else....
38e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 61 67 73 20 26 3d 20 28 62 79 74 65 ..................flags.&=.(byte
3900 29 7e 54 6f 75 63 68 46 6c 61 67 73 2e 49 6e 64 69 72 65 63 74 54 6f 75 63 68 3b 0d 0a 20 20 20 )~TouchFlags.IndirectTouch;.....
3920 20 20 20 20 20 20 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 .........}..........}...........
3940 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 69 73 54 61 70 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 .public.bool.isTap..........{...
3960 20 20 20 20 20 20 20 20 20 20 20 67 65 74 20 3d 3e 20 28 66 6c 61 67 73 20 26 20 28 62 79 74 65 ...........get.=>.(flags.&.(byte
3980 29 54 6f 75 63 68 46 6c 61 67 73 2e 54 61 70 29 20 21 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 )TouchFlags.Tap).!=.0;..........
39a0 20 20 20 20 73 65 74 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 ....set..............{..........
39c0 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ........if.(value)..............
39e0 20 20 20 20 20 20 20 20 66 6c 61 67 73 20 7c 3d 20 28 62 79 74 65 29 54 6f 75 63 68 46 6c 61 67 ........flags.|=.(byte)TouchFlag
3a00 73 2e 54 61 70 3b 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 s.Tap;..................else....
3a20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 61 67 73 20 26 3d 20 28 62 79 74 65 ..................flags.&=.(byte
3a40 29 7e 54 6f 75 63 68 46 6c 61 67 73 2e 54 61 70 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d )~TouchFlags.Tap;..............}
3a60 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 69 6e 68 65 ..........}............///.<inhe
3a80 72 69 74 64 6f 63 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 46 6f 75 72 43 43 20 ritdoc/>..........public.FourCC.
3aa0 66 6f 72 6d 61 74 20 3d 3e 20 46 6f 72 6d 61 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f format.=>.Format;............///
3ac0 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 74 75 72 6e 20 61 .<summary>..........///.Return.a
3ae0 20 73 74 72 69 6e 67 20 72 65 70 72 65 73 65 6e 74 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 73 74 .string.representation.of.the.st
3b00 61 74 65 20 75 73 65 66 75 6c 20 66 6f 72 20 64 65 62 75 67 67 69 6e 67 2e 0d 0a 20 20 20 20 20 ate.useful.for.debugging........
3b20 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 2f 2f 2f 20 3c ...///.</summary>..........///.<
3b40 72 65 74 75 72 6e 73 3e 41 20 73 74 72 69 6e 67 20 72 65 70 72 65 73 65 6e 74 61 74 69 6f 6e 20 returns>A.string.representation.
3b60 6f 66 20 74 68 65 20 74 6f 75 63 68 20 73 74 61 74 65 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 of.the.touch.state.</returns>...
3b80 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 6f 76 65 72 72 69 64 65 20 73 74 72 69 6e 67 20 54 6f .......public.override.string.To
3ba0 53 74 72 69 6e 67 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 String()..........{.............
3bc0 20 72 65 74 75 72 6e 20 24 22 7b 7b 20 69 64 3d 7b 74 6f 75 63 68 49 64 7d 20 70 68 61 73 65 3d .return.$"{{.id={touchId}.phase=
3be0 7b 70 68 61 73 65 7d 20 70 6f 73 3d 7b 70 6f 73 69 74 69 6f 6e 7d 20 64 65 6c 74 61 3d 7b 64 65 {phase}.pos={position}.delta={de
3c00 6c 74 61 7d 20 70 72 65 73 73 75 72 65 3d 7b 70 72 65 73 73 75 72 65 7d 20 72 61 64 69 75 73 3d lta}.pressure={pressure}.radius=
3c20 7b 72 61 64 69 75 73 7d 20 70 72 69 6d 61 72 79 3d 7b 69 73 50 72 69 6d 61 72 79 54 6f 75 63 68 {radius}.primary={isPrimaryTouch
3c40 7d 20 7d 7d 22 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 }.}}";..........}......}........
3c60 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 44 65 66 61 75 6c 74 20 73 ///.<summary>......///.Default.s
3c80 74 61 74 65 20 6c 61 79 6f 75 74 20 66 6f 72 20 74 6f 75 63 68 20 64 65 76 69 63 65 73 2e 0d 0a tate.layout.for.touch.devices...
3ca0 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 65 6d ....///.</summary>......///.<rem
3cc0 61 72 6b 73 3e 0d 0a 20 20 20 20 2f 2f 2f 20 43 6f 6d 62 69 6e 65 73 20 6d 75 6c 74 69 70 6c 65 arks>......///.Combines.multiple
3ce0 20 70 6f 69 6e 74 65 72 73 20 65 61 63 68 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 74 6f 20 .pointers.each.corresponding.to.
3d00 61 20 73 69 6e 67 6c 65 20 63 6f 6e 74 61 63 74 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 a.single.contact.......///......
3d20 2f 2f 2f 20 4e 6f 72 6d 61 6c 6c 79 2c 20 54 4f 44 4f 20 28 73 65 6e 64 69 6e 67 20 73 74 61 74 ///.Normally,.TODO.(sending.stat
3d40 65 20 65 76 65 6e 74 73 29 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 41 6c 6c 20 e.events)......///......///.All.
3d60 74 6f 75 63 68 65 73 20 63 6f 6d 62 69 6e 65 20 74 6f 20 71 75 69 74 65 20 61 20 62 69 74 20 6f touches.combine.to.quite.a.bit.o
3d80 66 20 73 74 61 74 65 3b 20 69 64 65 61 6c 6c 79 20 73 65 6e 64 20 64 65 6c 74 61 20 65 76 65 6e f.state;.ideally.send.delta.even
3da0 74 73 20 74 68 61 74 20 75 70 64 61 74 65 0d 0a 20 20 20 20 2f 2f 2f 20 6f 6e 6c 79 20 73 70 65 ts.that.update......///.only.spe
3dc0 63 69 66 69 63 20 66 69 6e 67 65 72 73 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f cific.fingers.......///......///
3de0 20 54 68 69 73 20 69 73 20 4e 4f 54 20 75 73 65 64 20 62 79 20 6e 61 74 69 76 65 2e 20 49 6e 73 .This.is.NOT.used.by.native..Ins
3e00 74 65 61 64 2c 20 74 68 65 20 6e 61 74 69 76 65 20 72 75 6e 74 69 6d 65 20 61 6c 77 61 79 73 20 tead,.the.native.runtime.always.
3e20 73 65 6e 64 73 20 69 6e 64 69 76 69 64 75 61 6c 20 74 6f 75 63 68 65 73 20 28 3c 73 65 65 20 63 sends.individual.touches.(<see.c
3e40 72 65 66 3d 22 54 6f 75 63 68 53 74 61 74 65 22 2f 3e 29 0d 0a 20 20 20 20 2f 2f 2f 20 61 6e 64 ref="TouchState"/>)......///.and
3e60 20 6c 65 61 76 65 73 20 73 74 61 74 65 20 6d 61 6e 61 67 65 6d 65 6e 74 20 66 6f 72 20 61 20 74 .leaves.state.management.for.a.t
3e80 6f 75 63 68 73 63 72 65 65 6e 20 61 73 20 61 20 77 68 6f 6c 65 20 74 6f 20 74 68 65 20 6d 61 6e ouchscreen.as.a.whole.to.the.man
3ea0 61 67 65 64 20 70 61 72 74 20 6f 66 20 74 68 65 20 73 79 73 74 65 6d 2e 0d 0a 20 20 20 20 2f 2f aged.part.of.the.system.......//
3ec0 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 5b 53 74 72 75 63 74 4c 61 79 6f 75 74 28 /.</remarks>......[StructLayout(
3ee0 4c 61 79 6f 75 74 4b 69 6e 64 2e 45 78 70 6c 69 63 69 74 2c 20 53 69 7a 65 20 3d 20 4d 61 78 54 LayoutKind.Explicit,.Size.=.MaxT
3f00 6f 75 63 68 65 73 20 2a 20 54 6f 75 63 68 53 74 61 74 65 2e 6b 53 69 7a 65 49 6e 42 79 74 65 73 ouches.*.TouchState.kSizeInBytes
3f20 29 5d 0d 0a 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 75 6e 73 61 66 65 20 73 74 72 75 63 74 20 54 )]......internal.unsafe.struct.T
3f40 6f 75 63 68 73 63 72 65 65 6e 53 74 61 74 65 20 3a 20 49 49 6e 70 75 74 53 74 61 74 65 54 79 70 ouchscreenState.:.IInputStateTyp
3f60 65 49 6e 66 6f 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 eInfo......{..........///.<summa
3f80 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4d 65 6d 6f 72 79 20 66 6f 72 6d 61 74 20 74 ry>..........///.Memory.format.t
3fa0 61 67 20 66 6f 72 20 54 6f 75 63 68 73 63 72 65 65 6e 53 74 61 74 65 2e 0d 0a 20 20 20 20 20 20 ag.for.TouchscreenState.........
3fc0 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 2f 2f 2f 20 3c 76 ..///.</summary>..........///.<v
3fe0 61 6c 75 65 3e 52 65 74 75 72 6e 73 20 22 54 53 43 52 22 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 alue>Returns."TSCR".</value>....
4000 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 49 6e 70 75 74 53 74 ......///.<seealso.cref="InputSt
4020 61 74 65 42 6c 6f 63 6b 2e 66 6f 72 6d 61 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c ateBlock.format"/>..........publ
4040 69 63 20 73 74 61 74 69 63 20 46 6f 75 72 43 43 20 46 6f 72 6d 61 74 20 3d 3e 20 6e 65 77 20 46 ic.static.FourCC.Format.=>.new.F
4060 6f 75 72 43 43 28 27 54 27 2c 20 27 53 27 2c 20 27 43 27 2c 20 27 52 27 29 3b 0d 0a 0d 0a 20 20 ourCC('T',.'S',.'C',.'R');......
4080 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 20 20 20 2f 2f 2f ......///.<summary>..........///
40a0 20 4d 61 78 69 6d 75 6d 20 6e 75 6d 62 65 72 20 6f 66 20 74 6f 75 63 68 65 73 20 74 68 61 74 20 .Maximum.number.of.touches.that.
40c0 63 61 6e 20 62 65 20 74 72 61 63 6b 65 64 20 61 74 20 74 68 65 20 73 61 6d 65 20 74 69 6d 65 2e can.be.tracked.at.the.same.time.
40e0 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 20 20 20 20 20 ..........///.</summary>........
4100 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 4d 61 78 69 6d 75 6d 20 6e 75 6d 62 65 72 20 6f 66 20 63 ..///.<value>Maximum.number.of.c
4120 6f 6e 63 75 72 72 65 6e 74 20 74 6f 75 63 68 65 73 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 oncurrent.touches.</value>......
4140 20 20 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 69 6e 74 20 4d 61 78 54 6f 75 63 68 65 73 20 ....public.const.int.MaxTouches.
4160 3d 20 31 30 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 0a =.10;............///.<summary>..
4180 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 61 74 61 20 66 6f 72 20 74 68 65 20 74 6f 75 63 68 20 74 ........///.Data.for.the.touch.t
41a0 68 61 74 20 69 73 20 64 65 65 6d 65 64 20 74 68 65 20 22 70 72 69 6d 61 72 79 22 20 74 6f 75 63 hat.is.deemed.the."primary".touc
41c0 68 20 61 74 20 74 68 65 20 6d 6f 6d 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f h.at.the.moment...........///.</
41e0 73 75 6d 6d 61 72 79 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 summary>..........///.<remarks>.
4200 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 74 6f 75 63 68 20 64 75 70 6c 69 63 61 74 .........///.This.touch.duplicat
4220 65 73 20 74 6f 75 63 68 20 64 61 74 61 20 66 72 6f 6d 20 77 68 69 63 68 65 76 65 72 20 74 6f 75 es.touch.data.from.whichever.tou
4240 63 68 20 69 73 20 64 65 65 6d 65 64 20 74 68 65 20 70 72 69 6d 61 72 79 20 74 6f 75 63 68 20 61 ch.is.deemed.the.primary.touch.a
4260 74 20 74 68 65 20 6d 6f 6d 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 t.the.moment...........///.When.
4280 67 6f 69 6e 67 20 66 72 6f 6d 20 6e 6f 20 66 69 6e 67 65 72 73 20 64 6f 77 6e 20 74 6f 20 61 6e going.from.no.fingers.down.to.an
42a0 79 20 66 69 6e 67 65 72 20 64 6f 77 6e 2c 20 74 68 65 20 66 69 72 73 74 20 66 69 6e 67 65 72 20 y.finger.down,.the.first.finger.
42c0 74 6f 20 74 6f 75 63 68 20 74 68 65 20 73 63 72 65 65 6e 20 69 73 0d 0a 20 20 20 20 20 20 20 20 to.touch.the.screen.is..........
42e0 2f 2f 2f 20 64 65 65 6d 65 64 20 74 68 65 20 22 70 72 69 6d 61 72 79 20 74 6f 75 63 68 22 2e 20 ///.deemed.the."primary.touch"..
4300 49 74 20 73 74 61 79 73 20 74 68 65 20 70 72 69 6d 61 72 79 20 74 6f 75 63 68 20 75 6e 74 69 6c It.stays.the.primary.touch.until
4320 20 72 65 6c 65 61 73 65 64 2e 20 41 74 20 74 68 61 74 20 70 6f 69 6e 74 2c 20 69 66 20 61 6e 79 .released..At.that.point,.if.any
4340 20 6f 74 68 65 72 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 66 69 6e 67 65 72 20 69 73 20 73 74 .other..........///.finger.is.st
4360 69 6c 6c 20 64 6f 77 6e 2c 20 74 68 65 20 6e 65 78 74 20 66 69 6e 67 65 72 20 69 6e 20 3c 73 65 ill.down,.the.next.finger.in.<se
4380 65 20 63 72 65 66 3d 22 74 6f 75 63 68 44 61 74 61 22 2f 3e 20 69 73 0d 0a 20 20 20 20 20 20 20 e.cref="touchData"/>.is.........
43a0 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 48 61 76 69 6e 67 20 74 68 69 73 20 74 6f .///..........///.Having.this.to
43c0 75 63 68 20 62 65 20 69 74 73 20 6f 77 6e 20 73 65 70 61 72 61 74 65 20 73 74 61 74 65 20 61 6e uch.be.its.own.separate.state.an
43e0 64 20 6f 77 6e 20 73 65 70 61 72 61 74 65 20 63 6f 6e 74 72 6f 6c 20 61 6c 6c 6f 77 73 20 61 63 d.own.separate.control.allows.ac
4400 74 69 6f 6e 73 20 74 6f 20 74 72 61 63 6b 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 tions.to.track.the..........///.
4420 73 74 61 74 65 20 6f 66 20 74 68 65 20 70 72 69 6d 61 72 79 20 74 6f 75 63 68 20 65 76 65 6e 20 state.of.the.primary.touch.even.
4440 69 66 20 74 68 65 20 74 6f 75 63 68 20 6d 6f 76 65 73 20 66 72 6f 6d 20 6f 6e 65 20 66 69 6e 67 if.the.touch.moves.from.one.fing
4460 65 72 20 74 6f 20 61 6e 6f 74 68 65 72 20 69 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 74 6f 75 63 er.to.another.in.<see.cref="touc
4480 68 44 61 74 61 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 hData"/>...........///.</remarks
44a0 3e 0d 0a 20 20 20 20 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 28 6e 61 6d 65 20 3d 20 >..........[InputControl(name.=.
44c0 22 70 72 69 6d 61 72 79 54 6f 75 63 68 22 2c 20 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 22 50 "primaryTouch",.displayName.=."P
44e0 72 69 6d 61 72 79 20 54 6f 75 63 68 22 2c 20 6c 61 79 6f 75 74 20 3d 20 22 54 6f 75 63 68 22 2c rimary.Touch",.layout.=."Touch",
4500 20 73 79 6e 74 68 65 74 69 63 20 3d 20 74 72 75 65 29 5d 0d 0a 20 20 20 20 20 20 20 20 5b 49 6e .synthetic.=.true)]..........[In
4520 70 75 74 43 6f 6e 74 72 6f 6c 28 6e 61 6d 65 20 3d 20 22 70 72 69 6d 61 72 79 54 6f 75 63 68 2f putControl(name.=."primaryTouch/
4540 74 61 70 22 2c 20 75 73 61 67 65 20 3d 20 22 50 72 69 6d 61 72 79 41 63 74 69 6f 6e 22 29 5d 0d tap",.usage.=."PrimaryAction")].
4560 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 63 6f 6e 74 72 6f 6c 73 20 63 6f 6d 70 61 ...........//.Add.controls.compa
4580 74 69 62 6c 65 20 77 69 74 68 20 77 68 61 74 20 50 6f 69 6e 74 65 72 20 65 78 70 65 63 74 73 20 tible.with.what.Pointer.expects.
45a0 61 6e 64 20 72 65 64 69 72 65 63 74 20 74 68 65 69 72 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 73 and.redirect.their..........//.s
45c0 74 61 74 65 20 74 6f 20 74 68 65 20 73 74 61 74 65 20 6f 66 20 74 6f 75 63 68 30 20 73 6f 20 74 tate.to.the.state.of.touch0.so.t
45e0 68 61 74 20 74 68 69 73 20 65 73 73 65 6e 74 69 61 6c 6c 79 20 62 65 63 6f 6d 65 73 20 6f 75 72 hat.this.essentially.becomes.our
4600 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 70 6f 69 6e 74 65 72 20 63 6f 6e 74 72 6f 6c 2e 0d 0a 20 ..........//.pointer.control....
4620 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 53 6f 6d 65 20 63 6f 6e 74 72 6f 6c 73 20 66 72 .......//.NOTE:.Some.controls.fr
4640 6f 6d 20 50 6f 69 6e 74 65 72 20 64 6f 6e 27 74 20 6d 61 6b 65 20 73 65 6e 73 65 20 66 6f 72 20 om.Pointer.don't.make.sense.for.
4660 74 6f 75 63 68 20 61 6e 64 20 77 65 20 22 70 61 72 6b 22 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 touch.and.we."park"..........//.
4680 20 20 20 20 20 20 74 68 65 6d 20 62 79 20 61 73 73 69 67 6e 69 6e 67 20 74 68 65 6d 20 69 6e 76 ......them.by.assigning.them.inv
46a0 61 6c 69 64 20 6f 66 66 73 65 74 73 20 28 74 68 75 73 20 68 61 76 69 6e 67 20 61 75 74 6f 6d 61 alid.offsets.(thus.having.automa
46c0 74 69 63 20 73 74 61 74 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 6c 61 79 6f tic.state..........//.......layo
46e0 75 74 20 70 75 74 20 74 68 65 6d 20 61 74 20 74 68 65 20 65 6e 64 20 6f 66 20 6f 75 72 20 66 69 ut.put.them.at.the.end.of.our.fi
4700 78 65 64 20 73 74 61 74 65 29 2e 0d 0a 20 20 20 20 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 xed.state)...........[InputContr
4720 6f 6c 28 6e 61 6d 65 20 3d 20 22 70 6f 73 69 74 69 6f 6e 22 2c 20 75 73 65 53 74 61 74 65 46 72 ol(name.=."position",.useStateFr
4740 6f 6d 20 3d 20 22 70 72 69 6d 61 72 79 54 6f 75 63 68 2f 70 6f 73 69 74 69 6f 6e 22 29 5d 0d 0a om.=."primaryTouch/position")]..
4760 20 20 20 20 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 28 6e 61 6d 65 20 3d 20 22 64 65 ........[InputControl(name.=."de
4780 6c 74 61 22 2c 20 75 73 65 53 74 61 74 65 46 72 6f 6d 20 3d 20 22 70 72 69 6d 61 72 79 54 6f 75 lta",.useStateFrom.=."primaryTou
47a0 63 68 2f 64 65 6c 74 61 22 29 5d 0d 0a 20 20 20 20 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 ch/delta")]..........[InputContr
47c0 6f 6c 28 6e 61 6d 65 20 3d 20 22 70 72 65 73 73 75 72 65 22 2c 20 75 73 65 53 74 61 74 65 46 72 ol(name.=."pressure",.useStateFr
47e0 6f 6d 20 3d 20 22 70 72 69 6d 61 72 79 54 6f 75 63 68 2f 70 72 65 73 73 75 72 65 22 29 5d 0d 0a om.=."primaryTouch/pressure")]..
4800 20 20 20 20 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 28 6e 61 6d 65 20 3d 20 22 72 61 ........[InputControl(name.=."ra
4820 64 69 75 73 22 2c 20 75 73 65 53 74 61 74 65 46 72 6f 6d 20 3d 20 22 70 72 69 6d 61 72 79 54 6f dius",.useStateFrom.=."primaryTo
4840 75 63 68 2f 72 61 64 69 75 73 22 29 5d 0d 0a 20 20 20 20 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e uch/radius")]..........[InputCon
4860 74 72 6f 6c 28 6e 61 6d 65 20 3d 20 22 70 72 65 73 73 22 2c 20 75 73 65 53 74 61 74 65 46 72 6f trol(name.=."press",.useStateFro
4880 6d 20 3d 20 22 70 72 69 6d 61 72 79 54 6f 75 63 68 2f 70 68 61 73 65 22 2c 20 6c 61 79 6f 75 74 m.=."primaryTouch/phase",.layout
48a0 20 3d 20 22 54 6f 75 63 68 50 72 65 73 73 22 2c 20 73 79 6e 74 68 65 74 69 63 20 3d 20 74 72 75 .=."TouchPress",.synthetic.=.tru
48c0 65 2c 20 75 73 61 67 65 73 20 3d 20 6e 65 77 20 73 74 72 69 6e 67 5b 30 5d 29 5d 0d 0a 20 20 20 e,.usages.=.new.string[0])].....
48e0 20 20 20 20 20 5b 46 69 65 6c 64 4f 66 66 73 65 74 28 30 29 5d 0d 0a 20 20 20 20 20 20 20 20 70 .....[FieldOffset(0)]..........p
4900 75 62 6c 69 63 20 66 69 78 65 64 20 62 79 74 65 20 70 72 69 6d 61 72 79 54 6f 75 63 68 44 61 74 ublic.fixed.byte.primaryTouchDat
4920 61 5b 54 6f 75 63 68 53 74 61 74 65 2e 6b 53 69 7a 65 49 6e 42 79 74 65 73 5d 3b 0d 0a 0d 0a 20 a[TouchState.kSizeInBytes];.....
4940 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 63 6f 6e 73 74 20 69 6e 74 20 6b 54 6f 75 63 68 .......internal.const.int.kTouch
4960 44 61 74 61 4f 66 66 73 65 74 20 3d 20 54 6f 75 63 68 53 74 61 74 65 2e 6b 53 69 7a 65 49 6e 42 DataOffset.=.TouchState.kSizeInB
4980 79 74 65 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 28 6c ytes;............[InputControl(l
49a0 61 79 6f 75 74 20 3d 20 22 54 6f 75 63 68 22 2c 20 6e 61 6d 65 20 3d 20 22 74 6f 75 63 68 22 2c ayout.=."Touch",.name.=."touch",
49c0 20 64 69 73 70 6c 61 79 4e 61 6d 65 20 3d 20 22 54 6f 75 63 68 22 2c 20 61 72 72 61 79 53 69 7a .displayName.=."Touch",.arraySiz
49e0 65 20 3d 20 4d 61 78 54 6f 75 63 68 65 73 29 5d 0d 0a 20 20 20 20 20 20 20 20 5b 46 69 65 6c 64 e.=.MaxTouches)]..........[Field
4a00 4f 66 66 73 65 74 28 6b 54 6f 75 63 68 44 61 74 61 4f 66 66 73 65 74 29 5d 0d 0a 20 20 20 20 20 Offset(kTouchDataOffset)].......
4a20 20 20 20 70 75 62 6c 69 63 20 66 69 78 65 64 20 62 79 74 65 20 74 6f 75 63 68 44 61 74 61 5b 4d ...public.fixed.byte.touchData[M
4a40 61 78 54 6f 75 63 68 65 73 20 2a 20 54 6f 75 63 68 53 74 61 74 65 2e 6b 53 69 7a 65 49 6e 42 79 axTouches.*.TouchState.kSizeInBy
4a60 74 65 73 5d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 54 6f 75 63 68 53 74 61 tes];............public.TouchSta
4a80 74 65 2a 20 70 72 69 6d 61 72 79 54 6f 75 63 68 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 te*.primaryTouch..........{.....
4aa0 20 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 .........get..............{.....
4ac0 20 20 20 20 20 20 20 20 20 20 20 20 20 66 69 78 65 64 28 62 79 74 65 2a 20 70 74 72 20 3d 20 70 .............fixed(byte*.ptr.=.p
4ae0 72 69 6d 61 72 79 54 6f 75 63 68 44 61 74 61 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rimaryTouchData)................
4b00 20 20 72 65 74 75 72 6e 20 28 54 6f 75 63 68 53 74 61 74 65 2a 29 70 74 72 3b 0d 0a 20 20 20 20 ..return.(TouchState*)ptr;......
4b20 20 20 20 20 20 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 ........}..........}............
4b40 70 75 62 6c 69 63 20 54 6f 75 63 68 53 74 61 74 65 2a 20 74 6f 75 63 68 65 73 0d 0a 20 20 20 20 public.TouchState*.touches......
4b60 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 0d 0a 20 20 20 20 20 20 20 20 ....{..............get..........
4b80 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 69 78 65 64 28 62 79 74 ....{..................fixed(byt
4ba0 65 2a 20 70 74 72 20 3d 20 74 6f 75 63 68 44 61 74 61 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 e*.ptr.=.touchData).............
4bc0 20 20 20 20 20 72 65 74 75 72 6e 20 28 54 6f 75 63 68 53 74 61 74 65 2a 29 70 74 72 3b 0d 0a 20 .....return.(TouchState*)ptr;...
4be0 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 ...........}..........}.........
4c00 20 20 20 70 75 62 6c 69 63 20 46 6f 75 72 43 43 20 66 6f 72 6d 61 74 20 3d 3e 20 46 6f 72 6d 61 ...public.FourCC.format.=>.Forma
4c20 74 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 6e 61 6d 65 73 70 61 63 65 20 55 6e 69 74 79 45 t;......}..}....namespace.UnityE
4c40 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 0d 0a 7b 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 ngine.InputSystem..{......///.<s
4c60 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 49 6e 64 69 63 61 74 65 73 20 77 68 65 72 65 ummary>......///.Indicates.where
4c80 20 69 6e 20 69 74 73 20 6c 69 66 65 63 79 63 6c 65 20 61 20 67 69 76 65 6e 20 74 6f 75 63 68 20 .in.its.lifecycle.a.given.touch.
4ca0 69 73 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 70 75 62 is.......///.</summary>......pub
4cc0 6c 69 63 20 65 6e 75 6d 20 54 6f 75 63 68 50 68 61 73 65 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 lic.enum.TouchPhase......{......
4ce0 20 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 4e ....///.<summary>..........///.N
4d00 6f 20 61 63 74 69 76 69 74 79 20 68 61 73 20 62 65 65 6e 20 72 65 67 69 73 74 65 72 65 64 20 6f o.activity.has.been.registered.o
4d20 6e 20 74 68 65 20 74 6f 75 63 68 20 79 65 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f n.the.touch.yet...........///.</
4d40 73 75 6d 6d 61 72 79 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 summary>..........///.<remarks>.
4d60 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 20 67 69 76 65 6e 20 74 6f 75 63 68 20 73 74 61 74 65 .........///.A.given.touch.state
4d80 20 77 69 6c 6c 20 67 65 6e 65 72 61 6c 6c 79 20 6e 6f 74 20 67 6f 20 62 61 63 6b 20 74 6f 20 4e .will.generally.not.go.back.to.N
4da0 6f 6e 65 20 6f 6e 63 65 20 74 68 65 72 65 20 68 61 73 20 62 65 65 6e 20 69 6e 70 75 74 20 66 6f one.once.there.has.been.input.fo
4dc0 72 20 69 74 2e 20 4d 65 61 6e 69 6e 67 20 74 68 61 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 r.it..Meaning.that..........///.
4de0 69 74 20 67 65 6e 65 72 61 6c 6c 79 20 69 6e 64 69 63 61 74 65 73 20 61 20 64 65 66 61 75 6c 74 it.generally.indicates.a.default
4e00 2d 69 6e 69 74 69 61 6c 69 7a 65 64 20 74 6f 75 63 68 20 72 65 63 6f 72 64 2e 0d 0a 20 20 20 20 -initialized.touch.record.......
4e20 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 20 4e 6f 6e 65 ....///.</remarks>..........None
4e40 2c 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 ,............///.<summary>......
4e60 20 20 20 20 2f 2f 2f 20 41 20 74 6f 75 63 68 20 68 61 73 20 6a 75 73 74 20 62 65 67 75 6e 2c 20 ....///.A.touch.has.just.begun,.
4e80 69 2e 65 2e 20 61 20 66 69 6e 67 65 72 20 68 61 73 20 74 6f 75 63 68 65 64 20 74 68 65 20 73 63 i.e..a.finger.has.touched.the.sc
4ea0 72 65 65 6e 2e 2e 20 4f 6e 6c 79 20 74 68 65 20 66 69 72 73 74 20 74 6f 75 63 68 20 69 6e 70 75 reen...Only.the.first.touch.inpu
4ec0 74 20 69 6e 20 61 6e 79 20 67 69 76 65 6e 20 74 6f 75 63 68 20 77 69 6c 6c 20 68 61 76 65 20 74 t.in.any.given.touch.will.have.t
4ee0 68 69 73 20 70 68 61 73 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 his.phase...........///.</summar
4f00 79 3e 0d 0a 20 20 20 20 20 20 20 20 42 65 67 61 6e 2c 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f y>..........Began,............//
4f20 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 41 6e 20 6f 6e 67 6f /.<summary>..........///.An.ongo
4f40 69 6e 67 20 74 6f 75 63 68 20 68 61 73 20 63 68 61 6e 67 65 64 20 70 6f 73 69 74 69 6f 6e 2e 0d ing.touch.has.changed.position..
4f60 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 20 20 20 20 20 20 .........///.</summary>.........
4f80 20 4d 6f 76 65 64 2c 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 .Moved,............///.<summary>
4fa0 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 6e 20 6f 6e 67 6f 69 6e 67 20 74 6f 75 63 68 20 68 ..........///.An.ongoing.touch.h
4fc0 61 73 20 6a 75 73 74 20 65 6e 64 65 64 2c 20 69 2e 65 2e 20 74 68 65 20 72 65 73 70 65 63 74 69 as.just.ended,.i.e..the.respecti
4fe0 76 65 20 66 69 6e 67 65 72 20 68 61 73 20 62 65 65 6e 20 6c 69 66 74 65 64 20 6f 66 66 20 6f 66 ve.finger.has.been.lifted.off.of
5000 20 74 68 65 20 73 63 72 65 65 6e 2e 20 4f 6e 6c 79 20 74 68 65 20 6c 61 73 74 20 74 6f 75 63 68 .the.screen..Only.the.last.touch
5020 20 69 6e 70 75 74 20 69 6e 20 61 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 67 69 76 65 6e 20 74 .input.in.a..........///.given.t
5040 6f 75 63 68 20 77 69 6c 6c 20 68 61 76 65 20 74 68 69 73 20 70 68 61 73 65 2e 0d 0a 20 20 20 20 ouch.will.have.this.phase.......
5060 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 45 6e 64 65 ....///.</summary>..........Ende
5080 64 2c 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 d,............///.<summary>.....
50a0 20 20 20 20 20 2f 2f 2f 20 41 6e 20 6f 6e 67 6f 69 6e 67 20 74 6f 75 63 68 20 68 61 73 20 62 65 .....///.An.ongoing.touch.has.be
50c0 65 6e 20 63 61 6e 63 65 6c 6c 65 64 2c 20 69 2e 65 2e 20 65 6e 64 65 64 20 69 6e 20 61 20 77 61 en.cancelled,.i.e..ended.in.a.wa
50e0 79 20 6f 74 68 65 72 20 74 68 61 6e 20 74 68 72 6f 75 67 68 20 75 73 65 72 20 69 6e 74 65 72 61 y.other.than.through.user.intera
5100 63 74 69 6f 6e 2e 20 54 68 69 73 20 68 61 70 70 65 6e 73 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 ction..This.happens,.for.example
5120 2c 20 69 66 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 66 6f 63 75 73 20 69 73 20 6d 6f 76 65 64 ,.if..........///.focus.is.moved
5140 20 61 77 61 79 20 66 72 6f 6d 20 74 68 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 77 68 69 6c 65 .away.from.the.application.while
5160 20 74 68 65 20 74 6f 75 63 68 20 69 73 20 6f 6e 67 6f 69 6e 67 2e 0d 0a 20 20 20 20 20 20 20 20 .the.touch.is.ongoing...........
5180 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 43 61 6e 63 65 6c 65 64 ///.</summary>..........Canceled
51a0 2c 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 ,............///.<summary>......
51c0 20 20 20 20 2f 2f 2f 20 41 6e 20 6f 6e 67 6f 69 6e 67 20 74 6f 75 63 68 20 68 61 73 20 6e 6f 74 ....///.An.ongoing.touch.has.not
51e0 20 62 65 65 6e 20 6d 6f 76 65 64 20 28 6e 6f 74 20 72 65 63 65 69 76 65 64 20 61 6e 79 20 69 6e .been.moved.(not.received.any.in
5200 70 75 74 29 20 69 6e 20 61 20 66 72 61 6d 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f put).in.a.frame...........///.</
5220 73 75 6d 6d 61 72 79 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 summary>..........///.<remarks>.
5240 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 70 68 61 73 65 20 69 73 20 6e 6f 74 20 75 .........///.This.phase.is.not.u
5260 73 65 64 20 62 79 20 3c 73 65 65 20 63 72 65 66 3d 22 54 6f 75 63 68 73 63 72 65 65 6e 22 2f 3e sed.by.<see.cref="Touchscreen"/>
5280 2e 20 54 68 69 73 20 6d 65 61 6e 73 20 74 68 61 74 20 3c 73 65 65 20 63 72 65 66 3d 22 54 6f 75 ..This.means.that.<see.cref="Tou
52a0 63 68 43 6f 6e 74 72 6f 6c 22 2f 3e 20 77 69 6c 6c 20 6e 6f 74 20 67 65 6e 65 72 61 6c 6c 79 0d chControl"/>.will.not.generally.
52c0 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 72 65 74 75 72 6e 20 74 68 69 73 20 76 61 6c 75 65 20 66 .........///.return.this.value.f
52e0 6f 72 20 3c 73 65 65 20 63 72 65 66 3d 22 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 2e 70 68 61 73 65 or.<see.cref="TouchControl.phase
5300 22 2f 3e 2e 20 49 74 20 69 73 2c 20 68 6f 77 65 76 65 72 2c 20 75 73 65 64 20 62 79 20 3c 73 65 "/>..It.is,.however,.used.by.<se
5320 65 20 63 72 65 66 3d 22 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e e.cref="UnityEngine.InputSystem.
5340 45 6e 68 61 6e 63 65 64 54 6f 75 63 68 2e 54 6f 75 63 68 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 EnhancedTouch.Touch"/>..........
5360 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 53 74 61 74 69 6f 6e .///.</remarks>..........Station
5380 61 72 79 2c 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e ary,......}........///.<summary>
53a0 0d 0a 20 20 20 20 2f 2f 2f 20 41 20 6d 75 6c 74 69 2d 74 6f 75 63 68 20 73 75 72 66 61 63 65 2e ......///.A.multi-touch.surface.
53c0 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 72 ......///.</summary>......///.<r
53e0 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 6f 75 63 68 73 63 72 65 65 6e 20 69 73 20 emarks>......///.Touchscreen.is.
5400 73 6f 6d 65 77 68 61 74 20 64 69 66 66 65 72 65 6e 74 20 66 72 6f 6d 20 6d 6f 73 74 20 6f 74 68 somewhat.different.from.most.oth
5420 65 72 20 64 65 76 69 63 65 20 69 6d 70 6c 65 6d 65 6e 74 61 74 69 6f 6e 73 20 69 6e 20 74 68 61 er.device.implementations.in.tha
5440 74 20 69 74 20 64 6f 65 73 20 6e 6f 74 20 75 73 75 61 6c 6c 79 0d 0a 20 20 20 20 2f 2f 2f 20 63 t.it.does.not.usually......///.c
5460 6f 6e 73 75 6d 65 20 69 6e 70 75 74 20 69 6e 20 74 68 65 20 66 6f 72 6d 20 6f 66 20 61 20 66 75 onsume.input.in.the.form.of.a.fu
5480 6c 6c 20 64 65 76 69 63 65 20 73 6e 61 70 73 68 6f 74 20 62 75 74 20 72 61 74 68 65 72 20 63 6f ll.device.snapshot.but.rather.co
54a0 6e 73 75 6d 65 73 20 69 6e 70 75 74 20 73 65 6e 74 20 74 6f 20 69 74 20 69 6e 20 74 68 65 20 66 nsumes.input.sent.to.it.in.the.f
54c0 6f 72 6d 0d 0a 20 20 20 20 2f 2f 2f 20 6f 66 20 65 76 65 6e 74 73 20 63 6f 6e 74 61 69 6e 69 6e orm......///.of.events.containin
54e0 67 20 61 20 3c 73 65 65 20 63 72 65 66 3d 22 54 6f 75 63 68 53 74 61 74 65 22 2f 3e 20 65 61 63 g.a.<see.cref="TouchState"/>.eac
5500 68 2e 20 54 68 69 73 20 69 73 20 75 6e 75 73 75 61 6c 20 61 73 20 3c 73 65 65 20 63 72 65 66 3d h..This.is.unusual.as.<see.cref=
5520 22 54 6f 75 63 68 53 74 61 74 65 22 2f 3e 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 73 20 61 20 6d "TouchState"/>......///.uses.a.m
5540 65 6d 6f 72 79 20 66 6f 72 6d 61 74 20 64 69 66 66 65 72 65 6e 74 20 66 72 6f 6d 20 3c 73 65 65 emory.format.different.from.<see
5560 20 63 72 65 66 3d 22 54 6f 75 63 68 53 74 61 74 65 2e 46 6f 72 6d 61 74 22 2f 3e 2e 20 48 6f 77 .cref="TouchState.Format"/>..How
5580 65 76 65 72 2c 20 77 68 65 6e 20 61 20 3c 63 3e 54 6f 75 63 68 73 63 72 65 65 6e 3c 2f 63 3e 0d ever,.when.a.<c>Touchscreen</c>.
55a0 0a 20 20 20 20 2f 2f 2f 20 73 65 65 73 20 61 6e 20 65 76 65 6e 74 20 63 6f 6e 74 61 69 6e 69 6e .....///.sees.an.event.containin
55c0 67 20 61 20 3c 73 65 65 20 63 72 65 66 3d 22 54 6f 75 63 68 53 74 61 74 65 22 2f 3e 2c 20 69 74 g.a.<see.cref="TouchState"/>,.it
55e0 20 77 69 6c 6c 20 68 61 6e 64 6c 65 20 74 68 61 74 20 65 76 65 6e 74 20 6f 6e 20 61 20 73 70 65 .will.handle.that.event.on.a.spe
5600 63 69 61 6c 20 63 6f 64 65 20 70 61 74 68 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f cial.code.path.......///......//
5620 2f 20 54 68 69 73 20 61 6c 6c 6f 77 73 20 3c 63 3e 54 6f 75 63 68 73 63 72 65 65 6e 3c 2f 63 3e /.This.allows.<c>Touchscreen</c>
5640 20 74 6f 20 64 65 63 69 64 65 20 6f 6e 20 69 74 73 20 6f 77 6e 20 77 68 69 63 68 20 63 6f 6e 74 .to.decide.on.its.own.which.cont
5660 72 6f 6c 20 69 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 74 6f 75 63 68 65 73 22 2f 3e 20 74 6f 20 rol.in.<see.cref="touches"/>.to.
5680 73 74 6f 72 65 0d 0a 20 20 20 20 2f 2f 2f 20 61 20 74 6f 75 63 68 20 61 74 20 61 6e 64 20 74 6f store......///.a.touch.at.and.to
56a0 20 70 65 72 66 6f 72 6d 20 74 68 69 6e 67 73 20 73 75 63 68 20 61 73 20 74 61 70 20 64 65 74 65 .perform.things.such.as.tap.dete
56c0 63 74 69 6f 6e 20 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 54 6f 75 63 68 43 6f 6e 74 72 ction.(see.<see.cref="TouchContr
56e0 6f 6c 2e 74 61 70 22 2f 3e 20 61 6e 64 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 ol.tap"/>.and......///.<see.cref
5700 3d 22 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 2e 74 61 70 43 6f 75 6e 74 22 2f 3e 29 20 61 6e 64 20 ="TouchControl.tapCount"/>).and.
5720 70 72 69 6d 61 72 79 20 74 6f 75 63 68 20 68 61 6e 64 6c 69 6e 67 20 28 73 65 65 20 3c 73 65 65 primary.touch.handling.(see.<see
5740 20 63 72 65 66 3d 22 70 72 69 6d 61 72 79 54 6f 75 63 68 22 2f 3e 29 2e 0d 0a 20 20 20 20 2f 2f .cref="primaryTouch"/>).......//
5760 2f 0d 0a 20 20 20 20 2f 2f 2f 20 3c 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 63 /......///.<example>......///.<c
5780 6f 64 65 3e 0d 0a 20 20 20 20 2f 2f 2f 20 2f 2f 20 43 72 65 61 74 65 20 61 20 74 6f 75 63 68 73 ode>......///.//.Create.a.touchs
57a0 63 72 65 65 6e 20 64 65 76 69 63 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 76 61 72 20 74 6f 75 63 68 creen.device.......///.var.touch
57c0 73 63 72 65 65 6e 20 3d 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 41 64 64 44 65 76 69 63 65 26 6c screen.=.InputSystem.AddDevice&l
57e0 74 3b 54 6f 75 63 68 73 63 72 65 65 6e 26 67 74 3b 28 29 3b 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 t;Touchscreen&gt;();......///...
5800 20 20 20 2f 2f 2f 20 2f 2f 20 53 65 6e 64 20 61 20 74 6f 75 63 68 20 74 6f 20 74 68 65 20 64 65 ...///.//.Send.a.touch.to.the.de
5820 76 69 63 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 49 6e 70 75 74 53 79 73 74 65 6d 2e 51 75 65 75 65 vice.......///.InputSystem.Queue
5840 53 74 61 74 65 45 76 65 6e 74 28 74 6f 75 63 68 73 63 72 65 65 6e 2c 0d 0a 20 20 20 20 2f 2f 2f StateEvent(touchscreen,......///
5860 20 20 20 20 20 6e 65 77 20 54 6f 75 63 68 53 74 61 74 65 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 .....new.TouchState......///....
5880 20 7b 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 70 68 61 73 65 20 3d 20 54 6f 75 63 .{......///.........phase.=.Touc
58a0 68 50 68 61 73 65 2e 42 65 67 61 6e 2c 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 2f hPhase.Began,......///........./
58c0 2f 20 4d 75 73 74 20 68 61 76 65 20 61 20 76 61 6c 69 64 2c 20 6e 6f 6e 2d 7a 65 72 6f 20 74 6f /.Must.have.a.valid,.non-zero.to
58e0 75 63 68 20 49 44 2e 20 54 6f 75 63 68 73 63 72 65 65 6e 20 77 69 6c 6c 20 6e 6f 74 20 6f 70 65 uch.ID..Touchscreen.will.not.ope
5900 72 61 74 65 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 2f 2f 20 63 6f 72 72 65 63 74 rate......///.........//.correct
5920 6c 79 20 69 66 20 77 65 20 64 6f 6e 27 74 20 73 65 74 20 49 44 73 20 70 72 6f 70 65 72 6c 79 2e ly.if.we.don't.set.IDs.properly.
5940 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 74 6f 75 63 68 49 64 20 3d 20 31 2c 0d 0a ......///.........touchId.=.1,..
5960 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 70 6f 73 69 74 69 6f 6e 20 3d 20 6e 65 77 20 56 ....///.........position.=.new.V
5980 65 63 74 6f 72 32 28 31 32 33 2c 20 32 33 34 29 2c 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 ector2(123,.234),......///......
59a0 20 20 20 2f 2f 20 44 65 6c 74 61 20 77 69 6c 6c 20 62 65 20 63 6f 6d 70 75 74 65 64 20 62 79 20 ...//.Delta.will.be.computed.by.
59c0 54 6f 75 63 68 73 63 72 65 65 6e 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 2e 0d 0a 20 20 20 20 Touchscreen.automatically.......
59e0 2f 2f 2f 20 20 20 20 20 7d 29 3b 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 ///.....});......///.</code>....
5a00 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 20 2f ..///.</example>......///....../
5a20 2f 2f 20 4e 6f 74 65 20 74 68 61 74 20 74 68 69 73 20 63 6c 61 73 73 20 70 72 65 73 65 6e 74 73 //.Note.that.this.class.presents
5a40 20 61 20 66 61 69 72 6c 79 20 6c 6f 77 2d 6c 65 76 65 6c 20 74 6f 75 63 68 20 41 50 49 2e 20 57 .a.fairly.low-level.touch.API..W
5a60 68 65 6e 20 77 6f 72 6b 69 6e 67 20 77 69 74 68 20 74 6f 75 63 68 20 66 72 6f 6d 20 73 63 72 69 hen.working.with.touch.from.scri
5a80 70 74 20 63 6f 64 65 2c 0d 0a 20 20 20 20 2f 2f 2f 20 69 74 20 69 73 20 72 65 63 6f 6d 6d 65 6e pt.code,......///.it.is.recommen
5aa0 64 65 64 20 74 6f 20 75 73 65 20 74 68 65 20 68 69 67 68 65 72 2d 6c 65 76 65 6c 20 3c 73 65 65 ded.to.use.the.higher-level.<see
5ac0 20 63 72 65 66 3d 22 45 6e 68 61 6e 63 65 64 54 6f 75 63 68 2e 54 6f 75 63 68 22 2f 3e 20 41 50 .cref="EnhancedTouch.Touch"/>.AP
5ae0 49 20 69 6e 73 74 65 61 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a I.instead.......///.</remarks>..
5b00 20 20 20 20 5b 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 4c 61 79 6f 75 74 28 73 74 61 74 65 54 79 70 ....[InputControlLayout(stateTyp
5b20 65 20 3d 20 74 79 70 65 6f 66 28 54 6f 75 63 68 73 63 72 65 65 6e 53 74 61 74 65 29 2c 20 69 73 e.=.typeof(TouchscreenState),.is
5b40 47 65 6e 65 72 69 63 54 79 70 65 4f 66 44 65 76 69 63 65 20 3d 20 74 72 75 65 29 5d 0d 0a 20 20 GenericTypeOfDevice.=.true)]....
5b60 20 20 5b 53 63 72 69 70 74 69 6e 67 2e 50 72 65 73 65 72 76 65 5d 0d 0a 20 20 20 20 70 75 62 6c ..[Scripting.Preserve]......publ
5b80 69 63 20 63 6c 61 73 73 20 54 6f 75 63 68 73 63 72 65 65 6e 20 3a 20 50 6f 69 6e 74 65 72 2c 20 ic.class.Touchscreen.:.Pointer,.
5ba0 49 49 6e 70 75 74 53 74 61 74 65 43 61 6c 6c 62 61 63 6b 52 65 63 65 69 76 65 72 0d 0a 20 20 20 IInputStateCallbackReceiver.....
5bc0 20 7b 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>.......
5be0 20 20 20 2f 2f 2f 20 53 79 6e 74 68 65 74 69 63 20 63 6f 6e 74 72 6f 6c 20 74 68 61 74 20 68 61 ...///.Synthetic.control.that.ha
5c00 73 20 74 68 65 20 64 61 74 61 20 66 6f 72 20 74 68 65 20 74 6f 75 63 68 20 74 68 61 74 20 69 73 s.the.data.for.the.touch.that.is
5c20 20 64 65 65 6d 65 64 20 74 68 65 20 22 70 72 69 6d 61 72 79 22 20 74 6f 75 63 68 20 61 74 20 74 .deemed.the."primary".touch.at.t
5c40 68 65 20 6d 6f 6d 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 he.moment...........///.</summar
5c60 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 43 6f 6e 74 72 6f 6c 20 74 y>..........///.<value>Control.t
5c80 72 61 63 6b 69 6e 67 20 74 68 65 20 73 63 72 65 65 6e 27 73 20 70 72 69 6d 61 72 79 20 74 6f 75 racking.the.screen's.primary.tou
5ca0 63 68 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b ch.</value>..........///.<remark
5cc0 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 74 6f 75 63 68 20 64 75 70 6c 69 s>..........///.This.touch.dupli
5ce0 63 61 74 65 73 20 74 6f 75 63 68 20 64 61 74 61 20 66 72 6f 6d 20 77 68 69 63 68 65 76 65 72 20 cates.touch.data.from.whichever.
5d00 74 6f 75 63 68 20 69 73 20 64 65 65 6d 65 64 20 74 68 65 20 70 72 69 6d 61 72 79 20 74 6f 75 63 touch.is.deemed.the.primary.touc
5d20 68 20 61 74 20 74 68 65 20 6d 6f 6d 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 57 68 h.at.the.moment...........///.Wh
5d40 65 6e 20 67 6f 69 6e 67 20 66 72 6f 6d 20 6e 6f 20 66 69 6e 67 65 72 73 20 64 6f 77 6e 20 74 6f en.going.from.no.fingers.down.to
5d60 20 61 6e 79 20 66 69 6e 67 65 72 20 64 6f 77 6e 2c 20 74 68 65 20 66 69 72 73 74 20 66 69 6e 67 .any.finger.down,.the.first.fing
5d80 65 72 20 74 6f 20 74 6f 75 63 68 20 74 68 65 20 73 63 72 65 65 6e 20 69 73 0d 0a 20 20 20 20 20 er.to.touch.the.screen.is.......
5da0 20 20 20 2f 2f 2f 20 64 65 65 6d 65 64 20 74 68 65 20 22 70 72 69 6d 61 72 79 20 74 6f 75 63 68 ...///.deemed.the."primary.touch
5dc0 22 2e 20 49 74 20 73 74 61 79 73 20 74 68 65 20 70 72 69 6d 61 72 79 20 74 6f 75 63 68 20 75 6e "..It.stays.the.primary.touch.un
5de0 74 69 6c 20 74 68 65 20 6c 61 73 74 20 66 69 6e 67 65 72 20 69 73 20 72 65 6c 65 61 73 65 64 2e til.the.last.finger.is.released.
5e00 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 ..........///..........///.Note.
5e20 74 68 61 74 20 75 6e 6c 69 6b 65 20 74 68 65 20 74 6f 75 63 68 20 66 72 6f 6d 20 77 68 69 63 68 that.unlike.the.touch.from.which
5e40 20 69 74 20 6f 72 69 67 69 6e 61 74 65 73 2c 20 74 68 65 20 70 72 69 6d 61 72 79 20 74 6f 75 63 .it.originates,.the.primary.touc
5e60 68 20 77 69 6c 6c 20 62 65 20 6b 65 70 74 20 6f 6e 67 6f 69 6e 67 20 66 6f 72 0d 0a 20 20 20 20 h.will.be.kept.ongoing.for......
5e80 20 20 20 20 2f 2f 2f 20 61 73 20 6c 6f 6e 67 20 61 73 20 74 68 65 72 65 20 69 73 20 73 74 69 6c ....///.as.long.as.there.is.stil
5ea0 6c 20 61 20 66 69 6e 67 65 72 20 6f 6e 20 74 68 65 20 73 63 72 65 65 6e 2e 20 50 75 74 20 61 6e l.a.finger.on.the.screen..Put.an
5ec0 6f 74 68 65 72 20 77 61 79 2c 20 3c 73 65 65 20 63 72 65 66 3d 22 54 6f 75 63 68 43 6f 6e 74 72 other.way,.<see.cref="TouchContr
5ee0 6f 6c 2e 70 68 61 73 65 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f 66 20 3c 63 3e 70 ol.phase"/>..........///.of.<c>p
5f00 72 69 6d 61 72 79 54 6f 75 63 68 3c 2f 63 3e 20 77 69 6c 6c 20 6f 6e 6c 79 20 74 72 61 6e 73 69 rimaryTouch</c>.will.only.transi
5f20 74 69 6f 6e 20 74 6f 20 3c 73 65 65 20 63 72 65 66 3d 22 54 6f 75 63 68 50 68 61 73 65 2e 45 6e tion.to.<see.cref="TouchPhase.En
5f40 64 65 64 22 2f 3e 20 6f 6e 63 65 20 74 68 65 20 6c 61 73 74 20 66 69 6e 67 65 72 0d 0a 20 20 20 ded"/>.once.the.last.finger.....
5f60 20 20 20 20 20 2f 2f 2f 20 68 61 73 20 62 65 65 6e 20 6c 69 66 74 65 64 20 6f 66 66 20 74 68 65 .....///.has.been.lifted.off.the
5f80 20 73 63 72 65 65 6e 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 .screen...........///.</remarks>
5fa0 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 20 70 72 ..........public.TouchControl.pr
5fc0 69 6d 61 72 79 54 6f 75 63 68 20 7b 20 67 65 74 3b 20 70 72 69 76 61 74 65 20 73 65 74 3b 20 7d imaryTouch.{.get;.private.set;.}
5fe0 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>.......
6000 20 20 20 2f 2f 2f 20 41 72 72 61 79 20 6f 66 20 61 6c 6c 20 3c 73 65 65 20 63 72 65 66 3d 22 54 ...///.Array.of.all.<see.cref="T
6020 6f 75 63 68 43 6f 6e 74 72 6f 6c 22 2f 3e 73 20 6f 6e 20 74 68 65 20 64 65 76 69 63 65 2e 0d 0a ouchControl"/>s.on.the.device...
6040 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>..........
6060 2f 2f 2f 20 3c 76 61 6c 75 65 3e 41 6c 6c 20 3c 73 65 65 20 63 72 65 66 3d 22 54 6f 75 63 68 43 ///.<value>All.<see.cref="TouchC
6080 6f 6e 74 72 6f 6c 22 2f 3e 73 20 6f 6e 20 74 68 65 20 73 63 72 65 65 6e 2e 3c 2f 76 61 6c 75 65 ontrol"/>s.on.the.screen.</value
60a0 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 20 >..........///.<remarks>........
60c0 20 20 2f 2f 2f 20 42 79 20 64 65 66 61 75 6c 74 2c 20 61 20 74 6f 75 63 68 73 63 72 65 65 6e 20 ..///.By.default,.a.touchscreen.
60e0 77 69 6c 6c 20 61 6c 6c 6f 63 61 74 65 20 31 30 20 74 6f 75 63 68 20 63 6f 6e 74 72 6f 6c 73 2e will.allocate.10.touch.controls.
6100 20 54 68 69 73 20 63 61 6e 20 62 65 20 63 68 61 6e 67 65 64 0d 0a 20 20 20 20 20 20 20 20 2f 2f .This.can.be.changed..........//
6120 2f 20 62 79 20 6d 6f 64 69 66 79 69 6e 67 20 74 68 65 20 22 54 6f 75 63 68 73 63 72 65 65 6e 22 /.by.modifying.the."Touchscreen"
6140 20 6c 61 79 6f 75 74 20 69 74 73 65 6c 66 20 6f 72 20 62 79 20 64 65 72 69 76 65 64 20 6c 61 79 .layout.itself.or.by.derived.lay
6160 6f 75 74 73 2e 20 49 6e 20 70 72 61 63 74 69 63 65 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 outs..In.practice,..........///.
6180 74 68 69 73 20 6d 65 61 6e 73 20 74 68 61 74 20 74 68 69 73 20 61 72 72 61 79 20 77 69 6c 6c 20 this.means.that.this.array.will.
61a0 75 73 75 61 6c 6c 79 20 68 61 76 65 20 61 20 66 69 78 65 64 20 6c 65 6e 67 74 68 20 6f 66 20 31 usually.have.a.fixed.length.of.1
61c0 30 20 65 6e 74 72 69 65 73 20 62 75 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 74 20 6d 61 0.entries.but..........///.it.ma
61e0 79 20 64 65 76 69 61 74 65 20 66 72 6f 6d 20 74 68 61 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f y.deviate.from.that...........//
6200 2f 20 3c 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 52 65 61 /.</remarks>..........public.Rea
6220 64 4f 6e 6c 79 41 72 72 61 79 3c 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 3e 20 74 6f 75 63 68 65 73 dOnlyArray<TouchControl>.touches
6240 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 20 .{.get;.private.set;.}..........
6260 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 54 68 65 ..///.<summary>..........///.The
6280 20 74 6f 75 63 68 73 63 72 65 65 6e 20 74 68 61 74 20 77 61 73 20 61 64 64 65 64 20 6f 72 20 75 .touchscreen.that.was.added.or.u
62a0 70 64 61 74 65 64 20 6c 61 73 74 20 6f 72 20 6e 75 6c 6c 20 69 66 20 74 68 65 72 65 20 69 73 20 pdated.last.or.null.if.there.is.
62c0 6e 6f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 6f 75 63 68 73 63 72 65 65 6e 20 63 6f 6e 6e no..........///.touchscreen.conn
62e0 65 63 74 65 64 20 74 6f 20 74 68 65 20 73 79 73 74 65 6d 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f ected.to.the.system...........//
6300 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 76 61 6c 75 65 /.</summary>..........///.<value
6320 3e 43 75 72 72 65 6e 74 20 74 6f 75 63 68 20 73 63 72 65 65 6e 2e 3c 2f 76 61 6c 75 65 3e 0d 0a >Current.touch.screen.</value>..
6340 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 6e 65 77 20 73 74 61 74 69 63 20 54 6f 75 63 68 73 ........public.new.static.Touchs
6360 63 72 65 65 6e 20 63 75 72 72 65 6e 74 20 7b 20 67 65 74 3b 20 69 6e 74 65 72 6e 61 6c 20 73 65 creen.current.{.get;.internal.se
6380 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 69 6e 68 65 72 69 74 64 6f 63 20 t;.}............///.<inheritdoc.
63a0 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 6f 76 65 72 72 69 64 65 20 76 6f 69 64 />..........public.override.void
63c0 20 4d 61 6b 65 43 75 72 72 65 6e 74 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 .MakeCurrent()..........{.......
63e0 20 20 20 20 20 20 20 62 61 73 65 2e 4d 61 6b 65 43 75 72 72 65 6e 74 28 29 3b 0d 0a 20 20 20 20 .......base.MakeCurrent();......
6400 20 20 20 20 20 20 20 20 63 75 72 72 65 6e 74 20 3d 20 74 68 69 73 3b 0d 0a 20 20 20 20 20 20 20 ........current.=.this;.........
6420 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 69 6e 68 65 72 69 74 64 6f 63 20 2f 3e .}............///.<inheritdoc./>
6440 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 76 6f 69 ..........protected.override.voi
6460 64 20 4f 6e 52 65 6d 6f 76 65 64 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 d.OnRemoved()..........{........
6480 20 20 20 20 20 20 62 61 73 65 2e 4f 6e 52 65 6d 6f 76 65 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 ......base.OnRemoved();.........
64a0 20 20 20 20 20 69 66 20 28 63 75 72 72 65 6e 74 20 3d 3d 20 74 68 69 73 29 0d 0a 20 20 20 20 20 .....if.(current.==.this).......
64c0 20 20 20 20 20 20 20 20 20 20 20 63 75 72 72 65 6e 74 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 ...........current.=.null;......
64e0 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 69 6e 68 65 72 69 74 64 6f 63 ....}............///.<inheritdoc
6500 20 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6f 76 65 72 72 69 64 65 20 ./>..........protected.override.
6520 76 6f 69 64 20 46 69 6e 69 73 68 53 65 74 75 70 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 void.FinishSetup()..........{...
6540 20 20 20 20 20 20 20 20 20 20 20 62 61 73 65 2e 46 69 6e 69 73 68 53 65 74 75 70 28 29 3b 0d 0a ...........base.FinishSetup();..
6560 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 6d 61 72 79 54 6f 75 63 68 20 3d 20 47 65 74 ..............primaryTouch.=.Get
6580 43 68 69 6c 64 43 6f 6e 74 72 6f 6c 3c 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 3e 28 22 70 72 69 6d ChildControl<TouchControl>("prim
65a0 61 72 79 54 6f 75 63 68 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 69 aryTouch");................//.Fi
65c0 6e 64 20 6f 75 74 20 68 6f 77 20 6d 61 6e 79 20 74 6f 75 63 68 20 63 6f 6e 74 72 6f 6c 73 20 77 nd.out.how.many.touch.controls.w
65e0 65 20 68 61 76 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 74 6f 75 63 68 43 6f e.have...............var.touchCo
6600 6e 74 72 6f 6c 43 6f 75 6e 74 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 ntrolCount.=.0;..............for
6620 65 61 63 68 20 28 76 61 72 20 63 68 69 6c 64 20 69 6e 20 63 68 69 6c 64 72 65 6e 29 0d 0a 20 20 each.(var.child.in.children)....
6640 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 69 6c 64 20 69 73 20 54 6f 75 63 68 ..............if.(child.is.Touch
6660 43 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 20 20 20 20 2b 2b Control)......................++
6680 74 6f 75 63 68 43 6f 6e 74 72 6f 6c 43 6f 75 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 touchControlCount;..............
66a0 20 20 2f 2f 20 4b 65 65 70 20 70 72 69 6d 61 72 79 54 6f 75 63 68 20 6f 75 74 20 6f 66 20 61 72 ..//.Keep.primaryTouch.out.of.ar
66c0 72 61 79 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 74 ray...............Debug.Assert(t
66e0 6f 75 63 68 43 6f 6e 74 72 6f 6c 43 6f 75 6e 74 20 3e 3d 20 31 2c 20 22 53 68 6f 75 6c 64 20 68 ouchControlCount.>=.1,."Should.h
6700 61 76 65 20 66 6f 75 6e 64 20 61 74 20 6c 65 61 73 74 20 70 72 69 6d 61 72 79 54 6f 75 63 68 20 ave.found.at.least.primaryTouch.
6720 63 6f 6e 74 72 6f 6c 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 6f 75 63 control");..............if.(touc
6740 68 43 6f 6e 74 72 6f 6c 43 6f 75 6e 74 20 3e 3d 20 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 hControlCount.>=.1).............
6760 20 20 20 20 20 2d 2d 74 6f 75 63 68 43 6f 6e 74 72 6f 6c 43 6f 75 6e 74 3b 0d 0a 0d 0a 20 20 20 .....--touchControlCount;.......
6780 20 20 20 20 20 20 20 20 20 2f 2f 20 47 61 74 68 65 72 20 74 6f 75 63 68 20 63 6f 6e 74 72 6f 6c .........//.Gather.touch.control
67a0 73 20 69 6e 74 6f 20 61 72 72 61 79 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 74 s.into.array...............var.t
67c0 6f 75 63 68 41 72 72 61 79 20 3d 20 6e 65 77 20 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 5b 74 6f 75 ouchArray.=.new.TouchControl[tou
67e0 63 68 43 6f 6e 74 72 6f 6c 43 6f 75 6e 74 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 chControlCount];..............va
6800 72 20 74 6f 75 63 68 49 6e 64 65 78 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 r.touchIndex.=.0;..............f
6820 6f 72 65 61 63 68 20 28 76 61 72 20 63 68 69 6c 64 20 69 6e 20 63 68 69 6c 64 72 65 6e 29 0d 0a oreach.(var.child.in.children)..
6840 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 69 ............{..................i
6860 66 20 28 63 68 69 6c 64 20 3d 3d 20 70 72 69 6d 61 72 79 54 6f 75 63 68 29 0d 0a 20 20 20 20 20 f.(child.==.primaryTouch).......
6880 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 ...............continue;........
68a0 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 68 69 6c 64 20 69 73 20 54 6f 75 63 68 43 6f ............if.(child.is.TouchCo
68c0 6e 74 72 6f 6c 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 ntrol.control)..................
68e0 20 20 20 20 74 6f 75 63 68 41 72 72 61 79 5b 74 6f 75 63 68 49 6e 64 65 78 2b 2b 5d 20 3d 20 63 ....touchArray[touchIndex++].=.c
6900 6f 6e 74 72 6f 6c 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 ontrol;..............}..........
6920 20 20 20 20 20 20 74 6f 75 63 68 65 73 20 3d 20 6e 65 77 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 ......touches.=.new.ReadOnlyArra
6940 79 3c 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 3e 28 74 6f 75 63 68 41 72 72 61 79 29 3b 0d 0a 20 20 y<TouchControl>(touchArray);....
6960 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 54 6f 75 63 68 20 68 61 73 20 ......}............//.Touch.has.
6980 6d 6f 72 65 20 69 6e 76 6f 6c 76 65 64 20 73 74 61 74 65 20 68 61 6e 64 6c 69 6e 67 20 74 68 61 more.involved.state.handling.tha
69a0 6e 20 6d 6f 73 74 20 6f 74 68 65 72 20 64 65 76 69 63 65 73 2e 20 54 6f 20 6e 6f 74 20 70 75 74 n.most.other.devices..To.not.put
69c0 20 74 6f 75 63 68 20 61 6c 6c 6f 63 61 74 69 6f 6e 20 6c 6f 67 69 63 0d 0a 20 20 20 20 20 20 20 .touch.allocation.logic.........
69e0 20 2f 2f 20 69 6e 20 61 6c 6c 20 74 68 65 20 76 61 72 69 6f 75 73 20 70 6c 61 74 66 6f 72 6d 20 .//.in.all.the.various.platform.
6a00 62 61 63 6b 65 6e 64 73 20 28 69 2e 65 2e 20 73 65 65 20 61 20 74 6f 75 63 68 20 77 69 74 68 20 backends.(i.e..see.a.touch.with.
6a20 61 20 63 65 72 74 61 69 6e 20 49 44 20 63 6f 6d 69 6e 67 20 69 6e 20 66 72 6f 6d 20 74 68 65 20 a.certain.ID.coming.in.from.the.
6a40 73 79 73 74 65 6d 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 61 6e 64 20 74 68 65 6e 20 68 61 76 69 system..........//.and.then.havi
6a60 6e 67 20 74 6f 20 64 65 63 69 64 65 20 2a 77 68 65 72 65 2a 20 74 6f 20 73 74 6f 72 65 20 74 68 ng.to.decide.*where*.to.store.th
6a80 61 74 20 69 6e 73 69 64 65 20 6f 66 20 54 6f 75 63 68 73 63 72 65 65 6e 27 73 20 73 74 61 74 65 at.inside.of.Touchscreen's.state
6aa0 29 2c 20 77 65 20 68 61 76 65 20 62 61 63 6b 65 6e 64 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 ),.we.have.backends..........//.
6ac0 73 65 6e 64 20 75 73 20 69 6e 64 69 76 69 64 75 61 6c 20 74 6f 75 63 68 65 73 20 28 27 54 4f 55 send.us.individual.touches.('TOU
6ae0 43 27 29 20 69 6e 73 74 65 61 64 20 6f 66 20 77 68 6f 6c 65 20 54 6f 75 63 68 73 63 72 65 65 6e C').instead.of.whole.Touchscreen
6b00 20 73 6e 61 70 73 68 6f 74 73 20 28 27 54 53 52 43 27 29 2e 20 55 73 69 6e 67 0d 0a 20 20 20 20 .snapshots.('TSRC')..Using......
6b20 20 20 20 20 2f 2f 20 49 49 6e 70 75 74 53 74 61 74 65 43 61 6c 6c 62 61 63 6b 52 65 63 65 69 76 ....//.IInputStateCallbackReceiv
6b40 65 72 2c 20 54 6f 75 63 68 73 63 72 65 65 6e 20 74 68 65 6e 20 64 79 6e 61 6d 69 63 61 6c 6c 79 er,.Touchscreen.then.dynamically
6b60 20 64 65 63 69 64 65 73 20 77 68 65 72 65 20 74 6f 20 73 74 6f 72 65 20 74 68 65 20 74 6f 75 63 .decides.where.to.store.the.touc
6b80 68 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 41 6c 73 6f 2c h...........//..........//.Also,
6ba0 20 54 6f 75 63 68 73 63 72 65 65 6e 20 68 61 73 20 62 69 74 73 20 6f 66 20 6c 6f 67 69 63 20 74 .Touchscreen.has.bits.of.logic.t
6bc0 6f 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 73 79 6e 74 68 65 73 69 7a 65 20 74 68 65 20 73 o.automatically.synthesize.the.s
6be0 74 61 74 65 20 6f 66 20 63 6f 6e 74 72 6f 6c 73 20 69 74 20 69 6e 68 65 72 69 74 73 0d 0a 20 20 tate.of.controls.it.inherits....
6c00 20 20 20 20 20 20 2f 2f 20 66 72 6f 6d 20 50 6f 69 6e 74 65 72 20 28 73 75 63 68 20 61 73 20 22 ......//.from.Pointer.(such.as."
6c20 3c 50 6f 69 6e 74 65 72 3e 2f 70 72 65 73 73 22 29 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 0d 0a <Pointer>/press")...........//..
6c40 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 57 65 20 64 6f 20 2a 4e 4f 54 2a 20 6d 61 6b ........//.NOTE:.We.do.*NOT*.mak
6c60 65 20 61 20 65 66 66 6f 72 74 20 68 65 72 65 20 74 6f 20 70 72 65 76 65 6e 74 20 75 73 20 66 72 e.a.effort.here.to.prevent.us.fr
6c80 6f 6d 20 6c 6f 73 69 6e 67 20 73 68 6f 72 74 2d 6c 69 76 65 64 20 74 6f 75 63 68 65 73 2e 20 54 om.losing.short-lived.touches..T
6ca0 68 69 73 20 69 73 20 64 69 66 66 65 72 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 his.is.different..........//....
6cc0 20 20 20 66 72 6f 6d 20 74 68 65 20 6f 6c 64 20 69 6e 70 75 74 20 73 79 73 74 65 6d 20 77 68 65 ...from.the.old.input.system.whe
6ce0 72 65 20 69 6e 64 69 76 69 64 75 61 6c 20 74 6f 75 63 68 65 73 20 77 65 72 65 20 6e 6f 74 20 72 re.individual.touches.were.not.r
6d00 65 75 73 65 64 20 75 6e 74 69 6c 20 74 68 65 20 6e 65 78 74 20 66 72 61 6d 65 2e 20 54 68 69 73 eused.until.the.next.frame..This
6d20 20 6d 65 61 6e 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 74 68 61 74 20 61 64 .meant..........//.......that.ad
6d40 64 69 74 69 6f 6e 61 6c 20 74 6f 75 63 68 65 73 20 70 6f 74 65 6e 74 69 61 6c 6c 79 20 68 61 64 ditional.touches.potentially.had
6d60 20 74 6f 20 62 65 20 61 6c 6c 6f 63 61 74 65 64 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 61 63 63 .to.be.allocated.in.order.to.acc
6d80 6f 6d 6f 64 61 74 65 20 6e 65 77 20 74 6f 75 63 68 65 73 20 63 6f 6d 69 6e 67 0d 0a 20 20 20 20 omodate.new.touches.coming......
6da0 20 20 20 20 2f 2f 20 20 20 20 20 20 20 69 6e 20 66 72 6f 6d 20 74 68 65 20 73 79 73 74 65 6d 2e ....//.......in.from.the.system.
6dc0 0d 0a 20 20 20 20 20 20 20 20 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 54 ..........//..........//.......T
6de0 68 65 20 72 61 74 69 6f 6e 61 6c 65 20 66 6f 72 20 2a 4e 4f 54 2a 20 64 6f 69 6e 67 20 74 68 69 he.rationale.for.*NOT*.doing.thi
6e00 73 20 69 73 20 74 68 61 74 3a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 0d 0a 20 20 20 20 20 20 20 20 s.is.that:..........//..........
6e20 2f 2f 20 20 20 20 20 20 20 61 29 20 41 63 74 69 6f 6e 73 20 64 6f 6e 27 74 20 6e 65 65 64 20 69 //.......a).Actions.don't.need.i
6e40 74 2e 20 54 68 65 79 20 6f 62 73 65 72 76 65 20 65 76 65 72 79 20 73 69 6e 67 6c 65 20 73 74 61 t..They.observe.every.single.sta
6e60 74 65 20 63 68 61 6e 67 65 20 61 6e 64 20 74 68 75 73 20 77 69 6c 6c 20 6e 6f 74 20 6c 6f 73 65 te.change.and.thus.will.not.lose
6e80 20 64 61 74 61 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 20 20 65 76 65 6e 20 .data..........//..........even.
6ea0 69 66 20 69 74 20 69 73 20 73 68 6f 72 74 2d 6c 69 76 65 64 20 28 69 2e 65 2e 20 63 68 61 6e 67 if.it.is.short-lived.(i.e..chang
6ec0 65 73 20 6d 6f 72 65 20 74 68 61 6e 20 6f 6e 63 65 20 69 6e 20 74 68 65 20 73 61 6d 65 20 75 70 es.more.than.once.in.the.same.up
6ee0 64 61 74 65 29 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 62 29 20 54 68 65 20 date)...........//.......b).The.
6f00 68 69 67 68 65 72 2d 6c 65 76 65 6c 20 54 6f 75 63 68 20 28 45 6e 68 61 6e 63 65 64 54 6f 75 63 higher-level.Touch.(EnhancedTouc
6f20 68 53 75 70 70 6f 72 74 29 20 41 50 49 20 69 73 20 70 72 6f 76 69 64 65 64 20 74 6f 0d 0a 20 20 hSupport).API.is.provided.to....
6f40 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 20 20 6e 6f 74 20 6f 6e 6c 79 20 68 61 6e 64 6c ......//..........not.only.handl
6f60 65 20 74 68 69 73 20 73 63 65 6e 61 72 69 6f 20 62 75 74 20 61 6c 73 6f 20 67 69 76 65 20 61 20 e.this.scenario.but.also.give.a.
6f80 67 65 6e 65 72 61 6c 6c 79 20 6d 6f 72 65 20 66 6c 65 78 69 62 6c 65 20 61 6e 64 20 75 73 65 66 generally.more.flexible.and.usef
6fa0 75 6c 20 74 6f 75 63 68 20 41 50 49 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 20 ul.touch.API..........//........
6fc0 20 20 74 68 61 6e 20 77 72 69 74 69 6e 67 20 63 6f 64 65 20 64 69 72 65 63 74 6c 79 20 61 67 61 ..than.writing.code.directly.aga
6fe0 69 6e 73 74 20 54 6f 75 63 68 73 63 72 65 65 6e 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 6f inst.Touchscreen.............pro
7000 74 65 63 74 65 64 20 6e 65 77 20 75 6e 73 61 66 65 20 76 6f 69 64 20 4f 6e 4e 65 78 74 55 70 64 tected.new.unsafe.void.OnNextUpd
7020 61 74 65 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 50 72 ate()..........{..............Pr
7040 6f 66 69 6c 65 72 2e 42 65 67 69 6e 53 61 6d 70 6c 65 28 22 54 6f 75 63 68 73 63 72 65 65 6e 2e ofiler.BeginSample("Touchscreen.
7060 4f 6e 4e 65 78 74 55 70 64 61 74 65 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f OnNextUpdate");................/
7080 2f 2f 2f 54 4f 44 4f 3a 20 65 61 72 6c 79 20 6f 75 74 20 61 6e 64 20 73 6b 69 70 20 63 72 61 77 ///TODO:.early.out.and.skip.craw
70a0 6c 69 6e 67 20 74 68 72 6f 75 67 68 20 74 6f 75 63 68 65 73 20 69 66 20 77 65 20 64 69 64 6e 27 ling.through.touches.if.we.didn'
70c0 74 20 63 68 61 6e 67 65 20 73 74 61 74 65 20 69 6e 20 74 68 65 20 6c 61 73 74 20 75 70 64 61 74 t.change.state.in.the.last.updat
70e0 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 20 20 20 20 20 20 28 61 6c 73 6f 20 6f e..............////......(also.o
7100 62 73 6f 6c 65 74 65 73 20 74 68 65 20 6e 65 65 64 20 66 6f 72 20 74 68 65 20 69 66 28 29 20 63 bsoletes.the.need.for.the.if().c
7120 68 65 63 6b 20 62 65 6c 6f 77 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 74 61 heck.below)..............var.sta
7140 74 65 50 74 72 20 3d 20 63 75 72 72 65 6e 74 53 74 61 74 65 50 74 72 3b 0d 0a 20 20 20 20 20 20 tePtr.=.currentStatePtr;........
7160 20 20 20 20 20 20 76 61 72 20 74 6f 75 63 68 53 74 61 74 65 50 74 72 20 3d 20 28 54 6f 75 63 68 ......var.touchStatePtr.=.(Touch
7180 53 74 61 74 65 2a 29 28 28 62 79 74 65 2a 29 73 74 61 74 65 50 74 72 20 2b 20 73 74 61 74 65 42 State*)((byte*)statePtr.+.stateB
71a0 6c 6f 63 6b 2e 62 79 74 65 4f 66 66 73 65 74 20 2b 20 54 6f 75 63 68 73 63 72 65 65 6e 53 74 61 lock.byteOffset.+.TouchscreenSta
71c0 74 65 2e 6b 54 6f 75 63 68 44 61 74 61 4f 66 66 73 65 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 te.kTouchDataOffset);...........
71e0 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 74 6f 75 63 68 65 73 2e 43 ...for.(var.i.=.0;.i.<.touches.C
7200 6f 75 6e 74 3b 20 2b 2b 69 2c 20 2b 2b 74 6f 75 63 68 53 74 61 74 65 50 74 72 29 0d 0a 20 20 20 ount;.++i,.++touchStatePtr).....
7220 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 2f 2f 20 52 .........{..................//.R
7240 65 73 65 74 20 64 65 6c 74 61 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 eset.delta...................if.
7260 28 74 6f 75 63 68 53 74 61 74 65 50 74 72 2d 3e 64 65 6c 74 61 20 21 3d 20 64 65 66 61 75 6c 74 (touchStatePtr->delta.!=.default
7280 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 74 61 74 )......................InputStat
72a0 65 2e 43 68 61 6e 67 65 28 74 6f 75 63 68 65 73 5b 69 5d 2e 64 65 6c 74 61 2c 20 56 65 63 74 6f e.Change(touches[i].delta,.Vecto
72c0 72 32 2e 7a 65 72 6f 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 r2.zero);....................//.
72e0 52 65 73 65 74 20 74 61 70 20 63 6f 75 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Reset.tap.count.................
7300 20 20 2f 2f 20 4e 4f 54 45 3a 20 57 65 20 61 72 65 20 62 61 73 69 6e 67 20 74 68 69 73 20 6f 6e ..//.NOTE:.We.are.basing.this.on
7320 20 73 74 61 72 74 54 69 6d 65 20 72 61 74 68 65 72 20 74 68 61 6e 20 61 64 64 69 6e 67 20 6f 6e .startTime.rather.than.adding.on
7340 20 65 6e 64 20 74 69 6d 65 20 6f 66 20 74 68 65 20 6c 61 73 74 20 74 6f 75 63 68 2e 20 54 68 65 .end.time.of.the.last.touch..The
7360 20 72 65 61 73 6f 6e 20 69 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 .reason.is..................//..
7380 20 20 20 20 20 74 68 61 74 20 74 6f 20 64 6f 20 73 6f 20 77 65 20 77 6f 75 6c 64 20 68 61 76 65 .....that.to.do.so.we.would.have
73a0 20 74 6f 20 61 64 64 20 61 6e 6f 74 68 65 72 20 72 65 63 6f 72 64 20 74 6f 20 6b 65 65 70 20 74 .to.add.another.record.to.keep.t
73c0 72 61 63 6b 20 6f 66 20 74 69 6d 65 73 74 61 6d 70 73 20 66 6f 72 20 65 61 63 68 20 74 6f 75 63 rack.of.timestamps.for.each.touc
73e0 68 2e 20 41 6e 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 h..And..................//......
7400 20 73 69 6e 63 65 20 77 65 20 6b 6e 6f 77 20 74 68 65 20 6d 61 78 69 6d 75 6d 20 74 69 6d 65 20 .since.we.know.the.maximum.time.
7420 74 68 61 74 20 61 20 74 61 70 20 63 61 6e 20 74 61 6b 65 2c 20 77 65 20 68 61 76 65 20 61 20 72 that.a.tap.can.take,.we.have.a.r
7440 65 61 73 6f 6e 61 62 6c 65 20 65 73 74 69 6d 61 74 65 20 66 6f 72 20 77 68 65 6e 20 61 20 70 72 easonable.estimate.for.when.a.pr
7460 69 6f 72 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 74 61 ior..................//.......ta
7480 70 20 6d 75 73 74 20 68 61 76 65 20 65 6e 64 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 p.must.have.ended...............
74a0 20 20 20 20 69 66 20 28 74 6f 75 63 68 53 74 61 74 65 50 74 72 2d 3e 74 61 70 43 6f 75 6e 74 20 ....if.(touchStatePtr->tapCount.
74c0 3e 20 30 20 26 26 20 49 6e 70 75 74 53 74 61 74 65 2e 63 75 72 72 65 6e 74 54 69 6d 65 20 3e 3d >.0.&&.InputState.currentTime.>=
74e0 20 74 6f 75 63 68 53 74 61 74 65 50 74 72 2d 3e 73 74 61 72 74 54 69 6d 65 20 2b 20 73 5f 54 61 .touchStatePtr->startTime.+.s_Ta
7500 70 54 69 6d 65 20 2b 20 73 5f 54 61 70 44 65 6c 61 79 54 69 6d 65 29 0d 0a 20 20 20 20 20 20 20 pTime.+.s_TapDelayTime).........
7520 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 74 61 74 65 2e 43 68 61 6e 67 65 28 74 .............InputState.Change(t
7540 6f 75 63 68 65 73 5b 69 5d 2e 74 61 70 43 6f 75 6e 74 2c 20 28 62 79 74 65 29 30 29 3b 0d 0a 20 ouches[i].tapCount,.(byte)0);...
7560 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 76 61 72 20 ...........}................var.
7580 70 72 69 6d 61 72 79 54 6f 75 63 68 53 74 61 74 65 20 3d 20 28 54 6f 75 63 68 53 74 61 74 65 2a primaryTouchState.=.(TouchState*
75a0 29 28 28 62 79 74 65 2a 29 73 74 61 74 65 50 74 72 20 2b 20 73 74 61 74 65 42 6c 6f 63 6b 2e 62 )((byte*)statePtr.+.stateBlock.b
75c0 79 74 65 4f 66 66 73 65 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 72 69 yteOffset);..............if.(pri
75e0 6d 61 72 79 54 6f 75 63 68 53 74 61 74 65 2d 3e 64 65 6c 74 61 20 21 3d 20 64 65 66 61 75 6c 74 maryTouchState->delta.!=.default
7600 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 74 61 74 65 2e 43 68 )..................InputState.Ch
7620 61 6e 67 65 28 70 72 69 6d 61 72 79 54 6f 75 63 68 2e 64 65 6c 74 61 2c 20 56 65 63 74 6f 72 32 ange(primaryTouch.delta,.Vector2
7640 2e 7a 65 72 6f 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 72 69 6d 61 72 79 .zero);..............if.(primary
7660 54 6f 75 63 68 53 74 61 74 65 2d 3e 74 61 70 43 6f 75 6e 74 20 3e 20 30 20 26 26 20 49 6e 70 75 TouchState->tapCount.>.0.&&.Inpu
7680 74 53 74 61 74 65 2e 63 75 72 72 65 6e 74 54 69 6d 65 20 3e 3d 20 70 72 69 6d 61 72 79 54 6f 75 tState.currentTime.>=.primaryTou
76a0 63 68 53 74 61 74 65 2d 3e 73 74 61 72 74 54 69 6d 65 20 2b 20 73 5f 54 61 70 54 69 6d 65 20 2b chState->startTime.+.s_TapTime.+
76c0 20 73 5f 54 61 70 44 65 6c 61 79 54 69 6d 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .s_TapDelayTime)................
76e0 20 20 49 6e 70 75 74 53 74 61 74 65 2e 43 68 61 6e 67 65 28 70 72 69 6d 61 72 79 54 6f 75 63 68 ..InputState.Change(primaryTouch
7700 2e 74 61 70 43 6f 75 6e 74 2c 20 28 62 79 74 65 29 30 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 .tapCount,.(byte)0);............
7720 20 20 20 20 50 72 6f 66 69 6c 65 72 2e 45 6e 64 53 61 6d 70 6c 65 28 29 3b 0d 0a 20 20 20 20 20 ....Profiler.EndSample();.......
7740 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 72 79 3e 0d 0a 20 ...}............///.<summary>...
7760 20 20 20 20 20 20 20 2f 2f 2f 20 43 61 6c 6c 65 64 20 77 68 65 6e 65 76 65 72 20 61 20 6e 65 77 .......///.Called.whenever.a.new
7780 20 73 74 61 74 65 20 65 76 65 6e 74 20 69 73 20 72 65 63 65 69 76 65 64 2e 0d 0a 20 20 20 20 20 .state.event.is.received........
77a0 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 2f 2f 2f 20 3c ...///.</summary>..........///.<
77c0 70 61 72 61 6d 20 6e 61 6d 65 3d 22 65 76 65 6e 74 50 74 72 22 3e 3c 2f 70 61 72 61 6d 3e 0d 0a param.name="eventPtr"></param>..
77e0 20 20 20 20 20 20 20 20 70 72 6f 74 65 63 74 65 64 20 6e 65 77 20 75 6e 73 61 66 65 20 76 6f 69 ........protected.new.unsafe.voi
7800 64 20 4f 6e 53 74 61 74 65 45 76 65 6e 74 28 49 6e 70 75 74 45 76 65 6e 74 50 74 72 20 65 76 65 d.OnStateEvent(InputEventPtr.eve
7820 6e 74 50 74 72 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 2f ntPtr)..........{............../
7840 2f 20 49 66 20 69 74 27 73 20 6e 6f 74 20 61 20 73 69 6e 67 6c 65 20 74 6f 75 63 68 2c 20 6a 75 /.If.it's.not.a.single.touch,.ju
7860 73 74 20 74 61 6b 65 20 74 68 65 20 65 76 65 6e 74 20 73 74 61 74 65 20 61 73 20 69 73 20 28 77 st.take.the.event.state.as.is.(w
7880 69 6c 6c 20 68 61 76 65 20 74 6f 20 62 65 20 54 6f 75 63 68 73 63 72 65 65 6e 53 74 61 74 65 29 ill.have.to.be.TouchscreenState)
78a0 2e 0d 0a 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 73 74 61 74 ...............if.(eventPtr.stat
78c0 65 46 6f 72 6d 61 74 20 21 3d 20 54 6f 75 63 68 53 74 61 74 65 2e 46 6f 72 6d 61 74 29 0d 0a 20 eFormat.!=.TouchState.Format)...
78e0 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 49 6e ...........{..................In
7900 70 75 74 53 74 61 74 65 2e 43 68 61 6e 67 65 28 74 68 69 73 2c 20 65 76 65 6e 74 50 74 72 29 3b putState.Change(this,.eventPtr);
7920 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;.......
7940 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 57 65 20 64 6f .......}................//.We.do
7960 6e 27 74 20 61 6c 6c 6f 77 20 70 61 72 74 69 61 6c 20 75 70 64 61 74 65 73 20 66 6f 72 20 54 6f n't.allow.partial.updates.for.To
7980 75 63 68 53 74 61 74 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 65 76 65 6e uchStates...............if.(even
79a0 74 50 74 72 2e 49 73 41 3c 44 65 6c 74 61 53 74 61 74 65 45 76 65 6e 74 3e 28 29 29 0d 0a 20 20 tPtr.IsA<DeltaStateEvent>())....
79c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 ..............return;...........
79e0 20 20 20 20 20 50 72 6f 66 69 6c 65 72 2e 42 65 67 69 6e 53 61 6d 70 6c 65 28 22 54 6f 75 63 68 .....Profiler.BeginSample("Touch
7a00 41 6c 6c 6f 63 61 74 65 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 6f Allocate");................//.Fo
7a20 72 20 70 65 72 66 6f 72 6d 61 6e 63 65 20 72 65 61 73 6f 6e 73 2c 20 77 65 20 72 65 61 64 20 6d r.performance.reasons,.we.read.m
7a40 65 6d 6f 72 79 20 68 65 72 65 20 64 69 72 65 63 74 6c 79 20 72 61 74 68 65 72 20 74 68 61 6e 20 emory.here.directly.rather.than.
7a60 67 6f 69 6e 67 20 74 68 72 6f 75 67 68 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 going.through..............//.Re
7a80 61 64 56 61 6c 75 65 28 29 20 6f 66 20 74 68 65 20 69 6e 64 69 76 69 64 75 61 6c 20 54 6f 75 63 adValue().of.the.individual.Touc
7aa0 68 43 6f 6e 74 72 6f 6c 20 63 68 69 6c 64 72 65 6e 2e 20 54 68 69 73 20 6d 65 61 6e 73 20 74 68 hControl.children..This.means.th
7ac0 61 74 20 54 6f 75 63 68 73 63 72 65 65 6e 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 at.Touchscreen,..............//.
7ae0 75 6e 6c 69 6b 65 20 6f 74 68 65 72 20 64 65 76 69 63 65 73 2c 20 69 73 20 68 61 72 64 77 69 72 unlike.other.devices,.is.hardwir
7b00 65 64 20 74 6f 20 61 20 73 69 6e 67 6c 65 20 6d 65 6d 6f 72 79 20 6c 61 79 6f 75 74 20 6f 6e 6c ed.to.a.single.memory.layout.onl
7b20 79 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 74 61 74 65 45 76 65 6e 74 y.................var.stateEvent
7b40 50 74 72 20 3d 20 53 74 61 74 65 45 76 65 6e 74 2e 46 72 6f 6d 28 65 76 65 6e 74 50 74 72 29 3b Ptr.=.StateEvent.From(eventPtr);
7b60 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 74 61 74 65 50 74 72 20 3d 20 63 75 72 ..............var.statePtr.=.cur
7b80 72 65 6e 74 53 74 61 74 65 50 74 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 rentStatePtr;..............var.c
7ba0 75 72 72 65 6e 74 54 6f 75 63 68 53 74 61 74 65 20 3d 20 28 54 6f 75 63 68 53 74 61 74 65 2a 29 urrentTouchState.=.(TouchState*)
7bc0 28 28 62 79 74 65 2a 29 73 74 61 74 65 50 74 72 20 2b 20 74 6f 75 63 68 65 73 5b 30 5d 2e 73 74 ((byte*)statePtr.+.touches[0].st
7be0 61 74 65 42 6c 6f 63 6b 2e 62 79 74 65 4f 66 66 73 65 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 ateBlock.byteOffset);...........
7c00 20 20 20 76 61 72 20 70 72 69 6d 61 72 79 54 6f 75 63 68 53 74 61 74 65 20 3d 20 28 54 6f 75 63 ...var.primaryTouchState.=.(Touc
7c20 68 53 74 61 74 65 2a 29 28 28 62 79 74 65 2a 29 73 74 61 74 65 50 74 72 20 2b 20 70 72 69 6d 61 hState*)((byte*)statePtr.+.prima
7c40 72 79 54 6f 75 63 68 2e 73 74 61 74 65 42 6c 6f 63 6b 2e 62 79 74 65 4f 66 66 73 65 74 29 3b 0d ryTouch.stateBlock.byteOffset);.
7c60 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 74 6f 75 63 68 43 6f 6e 74 72 6f 6c 43 6f 75 .............var.touchControlCou
7c80 6e 74 20 3d 20 74 6f 75 63 68 65 73 2e 43 6f 75 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 nt.=.touches.Count;.............
7ca0 20 20 20 2f 2f 20 4e 61 74 69 76 65 20 64 6f 65 73 20 6e 6f 74 20 73 65 6e 64 20 61 20 66 75 6c ...//.Native.does.not.send.a.ful
7cc0 6c 20 54 6f 75 63 68 53 74 61 74 65 20 61 73 20 77 65 20 64 65 66 69 6e 65 20 69 74 20 68 65 72 l.TouchState.as.we.define.it.her
7ce0 65 2e 20 57 65 20 68 61 76 65 20 61 64 64 65 64 20 73 6f 6d 65 20 66 69 65 6c 64 73 0d 0a 20 20 e..We.have.added.some.fields....
7d00 20 20 20 20 20 20 20 20 20 20 2f 2f 20 74 68 61 74 20 77 65 20 73 74 6f 72 65 20 69 6e 74 65 72 ..........//.that.we.store.inter
7d20 6e 61 6c 6c 79 2e 20 4d 61 6b 65 20 73 75 72 65 20 77 65 20 64 6f 6e 27 74 20 72 65 61 64 20 69 nally..Make.sure.we.don't.read.i
7d40 6e 76 61 6c 69 64 20 6d 65 6d 6f 72 79 20 68 65 72 65 20 61 6e 64 20 63 6f 70 79 20 6f 6e 6c 79 nvalid.memory.here.and.copy.only
7d60 20 77 68 61 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 77 65 20 67 6f 74 2e 0d 0a 20 .what..............//.we.got....
7d80 20 20 20 20 20 20 20 20 20 20 20 54 6f 75 63 68 53 74 61 74 65 20 6e 65 77 54 6f 75 63 68 53 74 ...........TouchState.newTouchSt
7da0 61 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 61 74 65 45 76 65 6e 74 ate;..............if.(stateEvent
7dc0 50 74 72 2d 3e 73 74 61 74 65 53 69 7a 65 49 6e 42 79 74 65 73 20 3d 3d 20 54 6f 75 63 68 53 74 Ptr->stateSizeInBytes.==.TouchSt
7de0 61 74 65 2e 6b 53 69 7a 65 49 6e 42 79 74 65 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b ate.kSizeInBytes)..............{
7e00 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 20 ..................newTouchState.
7e20 3d 20 2a 28 54 6f 75 63 68 53 74 61 74 65 2a 29 73 74 61 74 65 45 76 65 6e 74 50 74 72 2d 3e 73 =.*(TouchState*)stateEventPtr->s
7e40 74 61 74 65 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 20 20 tate;..............}............
7e60 20 20 65 6c 73 65 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 ..else..............{...........
7e80 20 20 20 20 20 20 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 20 3d 20 6e 65 77 20 54 6f 75 63 68 .......newTouchState.=.new.Touch
7ea0 53 74 61 74 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 55 6e 73 61 66 65 State();..................Unsafe
7ec0 55 74 69 6c 69 74 79 2e 4d 65 6d 43 70 79 28 55 6e 73 61 66 65 55 74 69 6c 69 74 79 2e 41 64 64 Utility.MemCpy(UnsafeUtility.Add
7ee0 72 65 73 73 4f 66 28 72 65 66 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 29 2c 20 73 74 61 74 65 ressOf(ref.newTouchState),.state
7f00 45 76 65 6e 74 50 74 72 2d 3e 73 74 61 74 65 2c 20 73 74 61 74 65 45 76 65 6e 74 50 74 72 2d 3e EventPtr->state,.stateEventPtr->
7f20 73 74 61 74 65 53 69 7a 65 49 6e 42 79 74 65 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 stateSizeInBytes);..............
7f40 7d 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 72 65 20 77 65 }................//.Make.sure.we
7f60 27 72 65 20 6e 6f 74 20 67 65 74 74 69 6e 67 20 74 68 72 6f 77 6e 20 6f 66 66 20 62 79 20 6e 6f 're.not.getting.thrown.off.by.no
7f80 69 73 65 20 6f 6e 20 66 69 65 6c 64 73 20 74 68 61 74 20 77 65 20 64 6f 6e 27 74 20 77 61 6e 74 ise.on.fields.that.we.don't.want
7fa0 20 74 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 70 69 63 6b 20 75 70 20 66 72 6f 6d .to..............//.pick.up.from
7fc0 20 69 6e 70 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 54 6f 75 63 68 53 74 61 .input...............newTouchSta
7fe0 74 65 2e 74 61 70 43 6f 75 6e 74 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 te.tapCount.=.0;..............ne
8000 77 54 6f 75 63 68 53 74 61 74 65 2e 69 73 54 61 70 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 wTouchState.isTap.=.false;......
8020 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 54 68 65 20 6c 6f 67 69 63 20 ..........////REVIEW:.The.logic.
8040 69 6e 20 68 65 72 65 20 6d 61 6b 65 73 20 75 73 20 69 6e 68 65 72 65 6e 74 6c 79 20 73 75 73 63 in.here.makes.us.inherently.susc
8060 65 70 74 69 62 6c 65 20 74 6f 20 74 68 65 20 6f 72 64 65 72 69 6e 67 20 6f 66 20 74 68 65 20 74 eptible.to.the.ordering.of.the.t
8080 6f 75 63 68 20 65 76 65 6e 74 73 20 69 6e 20 74 68 65 20 65 76 65 6e 74 0d 0a 20 20 20 20 20 20 ouch.events.in.the.event........
80a0 20 20 20 20 20 20 2f 2f 2f 2f 20 20 20 20 20 20 20 20 73 74 72 65 61 6d 2e 20 49 20 62 65 6c 69 ......////........stream..I.beli
80c0 65 76 65 20 77 65 20 68 61 76 65 20 70 6c 61 74 66 6f 72 6d 73 20 28 41 6e 64 72 6f 69 64 3f 29 eve.we.have.platforms.(Android?)
80e0 20 74 68 61 74 20 73 65 6e 64 20 75 73 20 74 6f 75 63 68 20 65 76 65 6e 74 73 20 66 69 6e 67 65 .that.send.us.touch.events.finge
8100 72 2d 62 79 2d 66 69 6e 67 65 72 20 28 6f 72 20 74 6f 75 63 68 2d 62 79 2d 74 6f 75 63 68 3f 29 r-by-finger.(or.touch-by-touch?)
8120 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 20 20 20 20 20 20 20 20 72 61 74 68 65 72 ..............////........rather
8140 20 74 68 61 6e 20 73 6f 72 74 65 64 20 62 79 20 74 69 6d 65 2e 20 54 68 69 73 20 77 69 6c 6c 20 .than.sorted.by.time..This.will.
8160 70 72 6f 62 61 62 6c 79 20 73 63 72 65 77 20 75 70 20 74 68 65 20 6c 6f 67 69 63 20 69 6e 20 68 probably.screw.up.the.logic.in.h
8180 65 72 65 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 69 74 27 73 20 61 ere.................//.If.it's.a
81a0 6e 20 6f 6e 67 6f 69 6e 67 20 74 6f 75 63 68 2c 20 74 72 79 20 74 6f 20 66 69 6e 64 20 74 68 65 n.ongoing.touch,.try.to.find.the
81c0 20 54 6f 75 63 68 53 74 61 74 65 20 77 65 20 68 61 76 65 20 61 6c 6c 6f 63 61 74 65 64 20 74 6f .TouchState.we.have.allocated.to
81e0 20 74 68 65 20 74 6f 75 63 68 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 70 72 65 76 69 .the.touch..............//.previ
8200 6f 75 73 6c 79 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 70 68 61 73 65 20 3d 20 ously...............var.phase.=.
8220 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2e 70 68 61 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 newTouchState.phase;............
8240 20 20 69 66 20 28 70 68 61 73 65 20 21 3d 20 54 6f 75 63 68 50 68 61 73 65 2e 42 65 67 61 6e 29 ..if.(phase.!=.TouchPhase.Began)
8260 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 ..............{.................
8280 20 76 61 72 20 74 6f 75 63 68 49 64 20 3d 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2e 74 6f 75 .var.touchId.=.newTouchState.tou
82a0 63 68 49 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 chId;..................for.(var.
82c0 69 20 3d 20 30 3b 20 69 20 3c 20 74 6f 75 63 68 43 6f 6e 74 72 6f 6c 43 6f 75 6e 74 3b 20 2b 2b i.=.0;.i.<.touchControlCount;.++
82e0 69 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 20 20 20 20 i)..................{...........
8300 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 75 72 72 65 6e 74 54 6f 75 63 68 53 74 61 74 65 ...........if.(currentTouchState
8320 5b 69 5d 2e 74 6f 75 63 68 49 64 20 3d 3d 20 74 6f 75 63 68 49 64 29 0d 0a 20 20 20 20 20 20 20 [i].touchId.==.touchId).........
8340 20 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 .............{..................
8360 20 20 20 20 20 20 20 20 2f 2f 20 50 72 65 73 65 72 76 65 20 70 72 69 6d 61 72 79 20 74 6f 75 63 ........//.Preserve.primary.touc
8380 68 20 73 74 61 74 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 h.state.........................
83a0 20 20 76 61 72 20 69 73 50 72 69 6d 61 72 79 54 6f 75 63 68 20 3d 20 63 75 72 72 65 6e 74 54 6f ..var.isPrimaryTouch.=.currentTo
83c0 75 63 68 53 74 61 74 65 5b 69 5d 2e 69 73 50 72 69 6d 61 72 79 54 6f 75 63 68 3b 0d 0a 20 20 20 uchState[i].isPrimaryTouch;.....
83e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 54 6f 75 63 68 53 74 61 .....................newTouchSta
8400 74 65 2e 69 73 50 72 69 6d 61 72 79 54 6f 75 63 68 20 3d 20 69 73 50 72 69 6d 61 72 79 54 6f 75 te.isPrimaryTouch.=.isPrimaryTou
8420 63 68 3b 0d 0a 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 2f ch;............................/
8440 2f 20 43 6f 6d 70 75 74 65 20 64 65 6c 74 61 20 69 66 20 74 6f 75 63 68 20 64 6f 65 73 6e 27 74 /.Compute.delta.if.touch.doesn't
8460 20 68 61 76 65 20 6f 6e 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .have.one.......................
8480 20 20 20 20 69 66 20 28 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2e 64 65 6c 74 61 20 3d 3d 20 64 ....if.(newTouchState.delta.==.d
84a0 65 66 61 75 6c 74 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 efault).........................
84c0 20 20 20 20 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2e 64 65 6c 74 61 20 3d 20 6e 65 77 54 6f .....newTouchState.delta.=.newTo
84e0 75 63 68 53 74 61 74 65 2e 70 6f 73 69 74 69 6f 6e 20 2d 20 63 75 72 72 65 6e 74 54 6f 75 63 68 uchState.position.-.currentTouch
8500 53 74 61 74 65 5b 69 5d 2e 70 6f 73 69 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 State[i].position;..............
8520 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 63 63 75 6d 75 6c 61 74 65 20 64 65 6c 74 ..............//.Accumulate.delt
8540 61 2e 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 6e 65 77 54 a...........................newT
8560 6f 75 63 68 53 74 61 74 65 2e 64 65 6c 74 61 20 2b 3d 20 63 75 72 72 65 6e 74 54 6f 75 63 68 53 ouchState.delta.+=.currentTouchS
8580 74 61 74 65 5b 69 5d 2e 64 65 6c 74 61 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 tate[i].delta;..................
85a0 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4b 65 65 70 20 73 74 61 72 74 20 74 69 6d 65 20 61 6e 64 ..........//.Keep.start.time.and
85c0 20 70 6f 73 69 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .position.......................
85e0 20 20 20 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2e 73 74 61 72 74 54 69 6d 65 20 3d 20 63 75 ....newTouchState.startTime.=.cu
8600 72 72 65 6e 74 54 6f 75 63 68 53 74 61 74 65 5b 69 5d 2e 73 74 61 72 74 54 69 6d 65 3b 0d 0a 20 rrentTouchState[i].startTime;...
8620 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 54 6f 75 63 68 53 .......................newTouchS
8640 74 61 74 65 2e 73 74 61 72 74 50 6f 73 69 74 69 6f 6e 20 3d 20 63 75 72 72 65 6e 74 54 6f 75 63 tate.startPosition.=.currentTouc
8660 68 53 74 61 74 65 5b 69 5d 2e 73 74 61 72 74 50 6f 73 69 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 hState[i].startPosition;........
8680 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 44 65 74 65 63 74 20 74 61 ....................//.Detect.ta
86a0 70 73 2e 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 76 61 72 ps...........................var
86c0 20 69 73 54 61 70 20 3d 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2e 69 73 4e 6f 6e 65 45 6e 64 .isTap.=.newTouchState.isNoneEnd
86e0 65 64 4f 72 43 61 6e 63 65 6c 65 64 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 edOrCanceled.&&.................
8700 20 20 20 20 20 20 20 20 20 20 20 20 20 28 65 76 65 6e 74 50 74 72 2e 74 69 6d 65 20 2d 20 6e 65 .............(eventPtr.time.-.ne
8720 77 54 6f 75 63 68 53 74 61 74 65 2e 73 74 61 72 74 54 69 6d 65 29 20 3c 3d 20 73 5f 54 61 70 54 wTouchState.startTime).<=.s_TapT
8740 69 6d 65 20 26 26 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 ime.&&..........................
8760 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 74 68 69 73 20 6f 6e 6c 79 20 74 61 6b 65 73 20 ....////REVIEW:.this.only.takes.
8780 74 68 65 20 66 69 6e 61 6c 20 64 65 6c 74 61 20 74 6f 20 73 74 61 72 74 20 70 6f 73 69 74 69 6f the.final.delta.to.start.positio
87a0 6e 20 69 6e 74 6f 20 61 63 63 6f 75 6e 74 2c 20 6e 6f 74 20 74 68 65 20 64 65 6c 74 61 20 6f 76 n.into.account,.not.the.delta.ov
87c0 65 72 20 74 68 65 20 6c 69 66 65 74 69 6d 65 20 6f 66 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 er.the.lifetime.of.the..........
87e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 20 20 20 20 20 20 20 20 ....................////........
8800 74 6f 75 63 68 3b 20 69 73 20 74 68 69 73 20 72 6f 62 75 73 74 20 65 6e 6f 75 67 68 20 6f 72 20 touch;.is.this.robust.enough.or.
8820 64 6f 20 77 65 20 6e 65 65 64 20 74 6f 20 6d 61 6b 65 20 73 75 72 65 20 74 68 61 74 20 77 65 20 do.we.need.to.make.sure.that.we.
8840 6e 65 76 65 72 20 6d 6f 76 65 20 6d 6f 72 65 20 74 68 61 6e 20 74 68 65 20 74 61 70 20 72 61 64 never.move.more.than.the.tap.rad
8860 69 75 73 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 ius.............................
8880 20 2f 2f 2f 2f 20 20 20 20 20 20 20 20 6f 76 65 72 20 74 68 65 20 65 6e 74 69 72 65 20 6c 69 66 .////........over.the.entire.lif
88a0 65 74 69 6d 65 20 6f 66 20 74 68 65 20 74 6f 75 63 68 3f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 etime.of.the.touch?.............
88c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2e .................(newTouchState.
88e0 70 6f 73 69 74 69 6f 6e 20 2d 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2e 73 74 61 72 74 50 6f position.-.newTouchState.startPo
8900 73 69 74 69 6f 6e 29 2e 73 71 72 4d 61 67 6e 69 74 75 64 65 20 3c 3d 20 73 5f 54 61 70 52 61 64 sition).sqrMagnitude.<=.s_TapRad
8920 69 75 73 53 71 75 61 72 65 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 iusSquared;.....................
8940 20 20 20 20 20 69 66 20 28 69 73 54 61 70 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .....if.(isTap).................
8960 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2e 74 61 70 43 6f .............newTouchState.tapCo
8980 75 6e 74 20 3d 20 28 62 79 74 65 29 28 63 75 72 72 65 6e 74 54 6f 75 63 68 53 74 61 74 65 5b 69 unt.=.(byte)(currentTouchState[i
89a0 5d 2e 74 61 70 43 6f 75 6e 74 20 2b 20 31 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ].tapCount.+.1);................
89c0 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..........else..................
89e0 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2e 74 61 70 43 6f 75 ............newTouchState.tapCou
8a00 6e 74 20 3d 20 63 75 72 72 65 6e 74 54 6f 75 63 68 53 74 61 74 65 5b 69 5d 2e 74 61 70 43 6f 75 nt.=.currentTouchState[i].tapCou
8a20 6e 74 3b 20 2f 2f 20 50 72 65 73 65 72 76 65 20 74 61 70 20 63 6f 75 6e 74 3b 20 72 65 73 65 74 nt;.//.Preserve.tap.count;.reset
8a40 20 69 6e 20 4f 6e 43 61 72 72 79 53 74 61 74 65 46 6f 72 77 61 72 64 2e 0d 0a 0d 0a 20 20 20 20 .in.OnCarryStateForward.........
8a60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 55 70 64 61 74 65 20 70 72 ....................//.Update.pr
8a80 69 6d 61 72 79 20 74 6f 75 63 68 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 imary.touch.....................
8aa0 20 20 20 20 20 20 69 66 20 28 69 73 50 72 69 6d 61 72 79 54 6f 75 63 68 29 0d 0a 20 20 20 20 20 ......if.(isPrimaryTouch).......
8ac0 20 20 20 20 20 20 20 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 ...................{............
8ae0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6e 65 77 54 6f 75 63 68 53 74 ..................if.(newTouchSt
8b00 61 74 65 2e 69 73 4e 6f 6e 65 45 6e 64 65 64 4f 72 43 61 6e 63 65 6c 65 64 29 0d 0a 20 20 20 20 ate.isNoneEndedOrCanceled)......
8b20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 ........................{.......
8b40 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 2f 2f 2f 2f 52 ...........................////R
8b60 45 56 49 45 57 3a 20 61 6c 73 6f 20 72 65 73 65 74 20 74 61 70 43 6f 75 6e 74 73 20 68 65 72 65 EVIEW:.also.reset.tapCounts.here
8b80 20 77 68 65 6e 20 74 61 70 20 64 65 6c 61 79 20 74 69 6d 65 20 68 61 73 20 65 78 70 69 72 65 64 .when.tap.delay.time.has.expired
8ba0 20 6f 6e 20 74 68 65 20 74 6f 75 63 68 3f 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .on.the.touch?..................
8bc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2e ..................newTouchState.
8be0 69 73 50 72 69 6d 61 72 79 54 6f 75 63 68 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 isPrimaryTouch.=.false;.........
8c00 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 2f 2f 20 50 72 ...........................//.Pr
8c20 69 6d 61 72 79 20 74 6f 75 63 68 20 77 61 73 20 65 6e 64 65 64 2e 20 53 65 65 20 69 66 20 74 68 imary.touch.was.ended..See.if.th
8c40 65 72 65 20 61 72 65 20 73 74 69 6c 6c 20 6f 74 68 65 72 20 6f 6e 67 6f 69 6e 67 20 74 6f 75 63 ere.are.still.other.ongoing.touc
8c60 68 65 73 2e 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 hes.............................
8c80 20 20 20 20 20 20 76 61 72 20 68 61 76 65 4f 6e 67 6f 69 6e 67 54 6f 75 63 68 20 3d 20 66 61 6c ......var.haveOngoingTouch.=.fal
8ca0 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 20 20 20 20 20 20 20 se;.............................
8cc0 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 6e 20 3d 20 30 3b 20 6e 20 3c 20 74 6f 75 63 68 43 6f .....for.(var.n.=.0;.n.<.touchCo
8ce0 6e 74 72 6f 6c 43 6f 75 6e 74 3b 20 2b 2b 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ntrolCount;.++n)................
8d00 20 20 20 20 20 20 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 ..................{.............
8d20 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 69 66 20 28 6e 20 3d .........................if.(n.=
8d40 3d 20 69 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 =.i)............................
8d60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 ..............continue;.........
8d80 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 20 20 20 69 ...............................i
8da0 66 20 28 63 75 72 72 65 6e 74 54 6f 75 63 68 53 74 61 74 65 5b 6e 5d 2e 69 73 49 6e 50 72 6f 67 f.(currentTouchState[n].isInProg
8dc0 72 65 73 73 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 ress)...........................
8de0 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 20 20 ...........{....................
8e00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 68 61 76 65 4f 6e 67 6f 69 6e ......................haveOngoin
8e20 67 54 6f 75 63 68 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 gTouch.=.true;..................
8e40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a ........................break;..
8e60 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 20 20 20 20 ................................
8e80 20 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 20 20 20 20 20 ....}...........................
8ea0 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 20 .......}........................
8ec0 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 68 61 76 65 4f 6e 67 6f 69 6e 67 54 6f 75 63 ............if.(!haveOngoingTouc
8ee0 68 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 h)..............................
8f00 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 20 ....{...........................
8f20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 6f 2c 20 70 72 69 6d 61 72 79 20 77 61 73 20 74 68 ...........//.No,.primary.was.th
8f40 65 20 6f 6e 6c 79 20 6f 6e 67 6f 69 6e 67 20 74 6f 75 63 68 2e 20 45 6e 64 20 69 74 2e 0d 0a 0d e.only.ongoing.touch..End.it....
8f60 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 20 20 20 ................................
8f80 20 20 20 20 20 69 66 20 28 69 73 54 61 70 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .....if.(isTap).................
8fa0 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 54 72 69 67 67 65 72 .........................Trigger
8fc0 54 61 70 28 70 72 69 6d 61 72 79 54 6f 75 63 68 2c 20 72 65 66 20 6e 65 77 54 6f 75 63 68 53 74 Tap(primaryTouch,.ref.newTouchSt
8fe0 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 20 20 20 20 ate,.eventPtr);.................
9000 20 20 20 20 20 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 .....................else.......
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 20 20 20 20 20 ................................
9040 20 20 20 49 6e 70 75 74 53 74 61 74 65 2e 43 68 61 6e 67 65 28 70 72 69 6d 61 72 79 54 6f 75 63 ...InputState.Change(primaryTouc
9060 68 2c 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2c 20 65 76 65 6e 74 50 74 72 3a 20 65 76 65 6e h,.newTouchState,.eventPtr:.even
9080 74 50 74 72 29 3b 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 tPtr);..........................
90a0 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 20 20 20 20 20 ........}.......................
90c0 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 20 20 20 20 20 20 20 ...........else.................
90e0 20 20 20 20 20 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 .................{..............
9100 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 59 65 73 2c 20 ........................//.Yes,.
9120 77 65 20 68 61 76 65 20 6f 74 68 65 72 20 74 6f 75 63 68 65 73 20 67 6f 69 6e 67 20 6f 6e 2e 20 we.have.other.touches.going.on..
9140 4d 61 6b 65 20 74 68 65 20 70 72 69 6d 61 72 79 20 74 6f 75 63 68 20 61 6e 0d 0a 20 20 20 20 20 Make.the.primary.touch.an.......
9160 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 20 20 20 2f .............................../
9180 2f 20 6f 72 70 68 61 6e 20 61 6e 64 20 77 61 69 74 20 75 6e 74 69 6c 20 74 68 65 20 6f 74 68 65 /.orphan.and.wait.until.the.othe
91a0 72 20 74 6f 75 63 68 65 73 20 61 72 65 20 72 65 6c 65 61 73 65 64 2e 0d 0a 0d 0a 20 20 20 20 20 r.touches.are.released..........
91c0 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 20 20 20 76 ...............................v
91e0 61 72 20 6e 65 77 50 72 69 6d 61 72 79 54 6f 75 63 68 53 74 61 74 65 20 3d 20 6e 65 77 54 6f 75 ar.newPrimaryTouchState.=.newTou
9200 63 68 53 74 61 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 chState;........................
9220 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 50 72 69 6d 61 72 79 54 6f 75 63 68 53 74 61 ..............newPrimaryTouchSta
9240 74 65 2e 70 68 61 73 65 20 3d 20 54 6f 75 63 68 50 68 61 73 65 2e 4d 6f 76 65 64 3b 0d 0a 20 20 te.phase.=.TouchPhase.Moved;....
9260 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 20 20 20 20 ................................
9280 20 20 6e 65 77 50 72 69 6d 61 72 79 54 6f 75 63 68 53 74 61 74 65 2e 69 73 4f 72 70 68 61 6e 65 ..newPrimaryTouchState.isOrphane
92a0 64 50 72 69 6d 61 72 79 54 6f 75 63 68 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 dPrimaryTouch.=.true;...........
92c0 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 49 6e 70 75 74 ...........................Input
92e0 53 74 61 74 65 2e 43 68 61 6e 67 65 28 70 72 69 6d 61 72 79 54 6f 75 63 68 2c 20 6e 65 77 50 72 State.Change(primaryTouch,.newPr
9300 69 6d 61 72 79 54 6f 75 63 68 53 74 61 74 65 2c 20 65 76 65 6e 74 50 74 72 3a 20 65 76 65 6e 74 imaryTouchState,.eventPtr:.event
9320 50 74 72 29 3b 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 Ptr);...........................
9340 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 20 20 20 20 20 20 .......}........................
9360 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 20 20 20 20 20 20 20 ......}.........................
9380 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .....else.......................
93a0 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 20 .......{........................
93c0 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 72 69 6d 61 72 79 20 74 6f 75 63 68 20 77 61 73 20 75 ..........//.Primary.touch.was.u
93e0 70 64 61 74 65 64 2e 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 pdated..........................
9400 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 74 61 74 65 2e 43 68 61 6e 67 65 28 70 72 69 6d 61 .........InputState.Change(prima
9420 72 79 54 6f 75 63 68 2c 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2c 20 65 76 65 6e 74 50 74 72 ryTouch,.newTouchState,.eventPtr
9440 3a 20 65 76 65 6e 74 50 74 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 :.eventPtr);....................
9460 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 20 20 20 ..........}.....................
9480 20 20 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 20 20 20 20 .....}..........................
94a0 65 6c 73 65 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 7b 0d else..........................{.
94c0 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 2f 2f 20 .............................//.
94e0 49 66 20 69 74 27 73 20 6e 6f 74 20 74 68 65 20 70 72 69 6d 61 72 79 20 74 6f 75 63 68 20 62 75 If.it's.not.the.primary.touch.bu
9500 74 20 74 68 65 20 74 6f 75 63 68 20 68 61 73 20 65 6e 64 65 64 2c 20 73 65 65 20 69 66 20 77 65 t.the.touch.has.ended,.see.if.we
9520 20 68 61 76 65 20 61 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .have.an........................
9540 20 20 20 20 20 20 2f 2f 20 6f 72 70 68 61 6e 65 64 20 70 72 69 6d 61 72 79 20 74 6f 75 63 68 2e ......//.orphaned.primary.touch.
9560 20 49 66 20 73 6f 2c 20 65 6e 64 20 69 74 20 6e 6f 77 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .If.so,.end.it.now..............
9580 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6e 65 77 54 6f 75 63 68 53 74 61 .................if.(newTouchSta
95a0 74 65 2e 69 73 4e 6f 6e 65 45 6e 64 65 64 4f 72 43 61 6e 63 65 6c 65 64 20 26 26 20 70 72 69 6d te.isNoneEndedOrCanceled.&&.prim
95c0 61 72 79 54 6f 75 63 68 53 74 61 74 65 2d 3e 69 73 4f 72 70 68 61 6e 65 64 50 72 69 6d 61 72 79 aryTouchState->isOrphanedPrimary
95e0 54 6f 75 63 68 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 Touch)..........................
9600 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 20 ....{...........................
9620 20 20 20 20 20 20 20 76 61 72 20 68 61 76 65 4f 6e 67 6f 69 6e 67 54 6f 75 63 68 20 3d 20 66 61 .......var.haveOngoingTouch.=.fa
9640 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 20 20 20 20 20 20 lse;............................
9660 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 6e 20 3d 20 30 3b 20 6e 20 3c 20 74 6f 75 63 68 43 ......for.(var.n.=.0;.n.<.touchC
9680 6f 6e 74 72 6f 6c 43 6f 75 6e 74 3b 20 2b 2b 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ontrolCount;.++n)...............
96a0 20 20 20 20 20 20 20 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 ...................{............
96c0 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 69 66 20 28 6e 20 ..........................if.(n.
96e0 3d 3d 20 69 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 ==.i)...........................
9700 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0d 0a 0d 0a 20 20 20 20 ...............continue;........
9720 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 20 20 20 20 ................................
9740 69 66 20 28 63 75 72 72 65 6e 74 54 6f 75 63 68 53 74 61 74 65 5b 6e 5d 2e 69 73 49 6e 50 72 6f if.(currentTouchState[n].isInPro
9760 67 72 65 73 73 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 gress)..........................
9780 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 20 ............{...................
97a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 68 61 76 65 4f 6e 67 6f 69 .......................haveOngoi
97c0 6e 67 54 6f 75 63 68 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ngTouch.=.true;.................
97e0 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 62 72 65 61 6b 3b 0d .........................break;.
9800 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 20 20 20 ................................
9820 20 20 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 20 20 20 20 .....}..........................
9840 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 ........}.......................
9860 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 68 61 76 65 4f 6e 67 6f 69 6e 67 54 6f 75 .............if.(!haveOngoingTou
9880 63 68 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 ch).............................
98a0 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 .....{..........................
98c0 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 6d 61 72 79 54 6f 75 63 68 53 74 61 74 65 2d 3e 69 ............primaryTouchState->i
98e0 73 4f 72 70 68 61 6e 65 64 50 72 69 6d 61 72 79 54 6f 75 63 68 20 3d 20 66 61 6c 73 65 3b 0d 0a sOrphanedPrimaryTouch.=.false;..
9900 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 20 20 20 20 ................................
9920 20 20 20 20 49 6e 70 75 74 53 74 61 74 65 2e 43 68 61 6e 67 65 28 70 72 69 6d 61 72 79 54 6f 75 ....InputState.Change(primaryTou
9940 63 68 2e 70 68 61 73 65 2c 20 28 62 79 74 65 29 54 6f 75 63 68 50 68 61 73 65 2e 45 6e 64 65 64 ch.phase,.(byte)TouchPhase.Ended
9960 29 3b 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 );..............................
9980 20 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 20 20 20 20 20 ....}...........................
99a0 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 20 20 20 20 7d 0d ...}..........................}.
99c0 0a 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 20 28 69 ...........................if.(i
99e0 73 54 61 70 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 7b sTap)..........................{
9a00 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 2f 2f ..............................//
9a20 20 4d 61 6b 65 20 74 61 70 20 62 75 74 74 6f 6e 20 67 6f 20 64 6f 77 6e 20 61 6e 64 20 75 70 2e .Make.tap.button.go.down.and.up.
9a40 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 2f 2f ..............................//
9a60 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 2f 2f ..............................//
9a80 20 4e 4f 54 45 3a 20 57 65 20 64 6f 20 74 68 69 73 20 68 65 72 65 20 69 6e 73 74 65 61 64 20 6f .NOTE:.We.do.this.here.instead.o
9aa0 66 20 72 69 67 68 74 20 61 77 61 79 20 75 70 20 74 68 65 72 65 20 77 68 65 6e 20 77 65 20 64 65 f.right.away.up.there.when.we.de
9ac0 74 65 63 74 20 74 68 65 20 74 6f 75 63 68 20 73 6f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 tect.the.touch.so...............
9ae0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 74 68 61 74 20 74 68 65 ...............//.......that.the
9b00 20 73 74 61 74 65 20 63 68 61 6e 67 65 20 6e 6f 74 69 66 69 63 61 74 69 6f 6e 73 20 67 6f 20 74 .state.change.notifications.go.t
9b20 6f 67 65 74 68 65 72 2e 20 46 69 72 73 74 20 74 68 6f 73 65 20 66 6f 72 20 74 68 65 20 70 72 69 ogether..First.those.for.the.pri
9b40 6d 61 72 79 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 mary............................
9b60 20 20 2f 2f 20 20 20 20 20 20 20 74 6f 75 63 68 2c 20 74 68 65 6e 20 74 68 65 20 6f 6e 65 73 20 ..//.......touch,.then.the.ones.
9b80 66 6f 72 20 74 68 65 20 74 6f 75 63 68 20 72 65 63 6f 72 64 20 69 74 73 65 6c 66 2e 0d 0a 20 20 for.the.touch.record.itself.....
9ba0 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 54 72 69 67 67 65 ..........................Trigge
9bc0 72 54 61 70 28 74 6f 75 63 68 65 73 5b 69 5d 2c 20 72 65 66 20 6e 65 77 54 6f 75 63 68 53 74 61 rTap(touches[i],.ref.newTouchSta
9be0 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 20 20 20 20 20 te,.eventPtr);..................
9c00 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 20 20 20 20 20 ........}.......................
9c20 20 20 20 65 6c 73 65 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 ...else.........................
9c40 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 20 20 .{..............................
9c60 49 6e 70 75 74 53 74 61 74 65 2e 43 68 61 6e 67 65 28 74 6f 75 63 68 65 73 5b 69 5d 2c 20 6e 65 InputState.Change(touches[i],.ne
9c80 77 54 6f 75 63 68 53 74 61 74 65 2c 20 65 76 65 6e 74 50 74 72 3a 20 65 76 65 6e 74 50 74 72 29 wTouchState,.eventPtr:.eventPtr)
9ca0 3b 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 7d 0d 0a 0d 0a ;..........................}....
9cc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 72 6f 66 69 6c 65 72 ........................Profiler
9ce0 2e 45 6e 64 53 61 6d 70 6c 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .EndSample();...................
9d00 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .......return;..................
9d20 20 20 20 20 7d 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 ....}..................}........
9d40 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 6f 75 6c 64 6e 27 74 20 66 69 6e 64 20 61 6e 20 ............//.Couldn't.find.an.
9d60 65 6e 74 72 79 2e 20 45 69 74 68 65 72 20 69 74 20 77 61 73 20 61 20 74 6f 75 63 68 20 74 68 61 entry..Either.it.was.a.touch.tha
9d80 74 20 77 65 20 70 72 65 76 69 6f 75 73 6c 79 20 72 61 6e 20 6f 75 74 20 6f 66 20 61 76 61 69 6c t.we.previously.ran.out.of.avail
9da0 61 62 6c 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 65 6e 74 72 69 65 73 able..................//.entries
9dc0 20 66 6f 72 20 6f 72 20 69 74 27 73 20 61 6e 20 65 76 65 6e 74 20 73 65 6e 74 20 6f 75 74 20 6f .for.or.it's.an.event.sent.out.o
9de0 66 20 73 65 71 75 65 6e 63 65 2e 20 49 67 6e 6f 72 65 20 74 68 65 20 74 6f 75 63 68 20 74 6f 20 f.sequence..Ignore.the.touch.to.
9e00 62 65 20 63 6f 6e 73 69 73 74 65 6e 74 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 be.consistent...................
9e20 20 20 50 72 6f 66 69 6c 65 72 2e 45 6e 64 53 61 6d 70 6c 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 ..Profiler.EndSample();.........
9e40 20 20 20 20 20 20 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 .........return;..............}.
9e60 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 74 27 73 20 61 20 6e 65 77 20 74 6f 75 ...............//.It's.a.new.tou
9e80 63 68 2e 20 54 72 79 20 74 6f 20 66 69 6e 64 20 61 6e 20 75 6e 75 73 65 64 20 54 6f 75 63 68 53 ch..Try.to.find.an.unused.TouchS
9ea0 74 61 74 65 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 tate...............for.(var.i.=.
9ec0 30 3b 20 69 20 3c 20 74 6f 75 63 68 43 6f 6e 74 72 6f 6c 43 6f 75 6e 74 3b 20 2b 2b 69 2c 20 2b 0;.i.<.touchControlCount;.++i,.+
9ee0 2b 63 75 72 72 65 6e 74 54 6f 75 63 68 53 74 61 74 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 +currentTouchState).............
9f00 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 57 65 27 .{..................//.NOTE:.We'
9f20 72 65 20 6f 76 65 72 77 72 69 74 69 6e 67 20 61 6e 79 20 65 6e 64 65 64 20 74 6f 75 63 68 20 69 re.overwriting.any.ended.touch.i
9f40 6d 6d 65 64 69 61 74 65 6c 79 20 68 65 72 65 2e 20 54 68 69 73 20 6d 65 61 6e 73 20 77 65 20 69 mmediately.here..This.means.we.i
9f60 6d 6d 65 64 69 61 74 65 6c 79 20 6f 76 65 72 77 72 69 74 65 20 65 76 65 6e 0d 0a 20 20 20 20 20 mmediately.overwrite.even.......
9f80 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 69 66 20 77 65 20 73 74 69 6c 6c 20 ...........//.......if.we.still.
9fa0 68 61 76 65 20 6f 74 68 65 72 20 75 6e 75 73 65 64 20 73 6c 6f 74 73 2e 20 57 68 61 74 20 74 68 have.other.unused.slots..What.th
9fc0 69 73 20 67 69 76 65 73 20 75 73 20 69 73 20 61 20 63 6f 6d 70 6c 65 74 65 6c 79 20 70 72 65 64 is.gives.us.is.a.completely.pred
9fe0 69 63 74 61 62 6c 65 20 74 6f 75 63 68 20 23 30 2e 2e 23 4e 0d 0a 20 20 20 20 20 20 20 20 20 20 ictable.touch.#0..#N............
a000 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 73 65 71 75 65 6e 63 65 20 28 69 2e 65 2e 20 74 6f ......//.......sequence.(i.e..to
a020 75 63 68 20 23 4e 20 69 73 20 6f 6e 6c 79 20 65 76 65 72 20 75 73 65 64 20 69 66 20 74 68 65 72 uch.#N.is.only.ever.used.if.ther
a040 65 20 61 72 65 20 69 6e 64 65 65 64 20 23 4e 20 63 6f 6e 63 75 72 72 65 6e 74 6c 79 20 74 6f 75 e.are.indeed.#N.concurrently.tou
a060 63 68 65 73 29 2e 20 48 6f 77 65 76 65 72 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ches)..However,.................
a080 20 2f 2f 20 20 20 20 20 20 20 69 74 20 64 6f 65 73 20 6d 65 61 6e 20 74 68 61 74 20 77 65 20 6f .//.......it.does.mean.that.we.o
a0a0 76 65 72 77 72 69 74 65 20 73 74 61 74 65 20 61 67 67 72 65 73 73 69 76 65 6c 79 2e 20 49 66 20 verwrite.state.aggressively..If.
a0c0 79 6f 75 20 61 72 65 20 6e 6f 74 20 75 73 69 6e 67 20 61 63 74 69 6f 6e 73 20 6f 72 20 74 68 65 you.are.not.using.actions.or.the
a0e0 20 68 69 67 68 65 72 2d 6c 65 76 65 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f .higher-level................../
a100 2f 20 20 20 20 20 20 20 54 6f 75 63 68 20 41 50 49 2c 20 62 65 20 61 77 61 72 65 20 6f 66 20 74 /.......Touch.API,.be.aware.of.t
a120 68 69 73 21 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 75 72 72 65 6e his!..................if.(curren
a140 74 54 6f 75 63 68 53 74 61 74 65 2d 3e 69 73 4e 6f 6e 65 45 6e 64 65 64 4f 72 43 61 6e 63 65 6c tTouchState->isNoneEndedOrCancel
a160 65 64 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 20 20 20 ed)..................{..........
a180 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2e 64 65 6c 74 61 20 ............newTouchState.delta.
a1a0 3d 20 56 65 63 74 6f 72 32 2e 7a 65 72 6f 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 =.Vector2.zero;.................
a1c0 20 20 20 20 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2e 73 74 61 72 74 54 69 6d 65 20 3d 20 65 .....newTouchState.startTime.=.e
a1e0 76 65 6e 74 50 74 72 2e 74 69 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ventPtr.time;...................
a200 20 20 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2e 73 74 61 72 74 50 6f 73 69 74 69 6f 6e 20 3d ...newTouchState.startPosition.=
a220 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2e 70 6f 73 69 74 69 6f 6e 3b 0d 0a 0d 0a 20 20 20 20 .newTouchState.position;........
a240 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'
a260 72 65 20 6e 6f 74 20 70 69 63 6b 69 6e 67 20 75 70 20 6e 6f 69 73 65 20 73 65 6e 74 20 66 72 6f re.not.picking.up.noise.sent.fro
a280 6d 20 6e 61 74 69 76 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6e m.native.......................n
a2a0 65 77 54 6f 75 63 68 53 74 61 74 65 2e 69 73 50 72 69 6d 61 72 79 54 6f 75 63 68 20 3d 20 66 61 ewTouchState.isPrimaryTouch.=.fa
a2c0 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 6e 65 77 54 6f 75 lse;......................newTou
a2e0 63 68 53 74 61 74 65 2e 69 73 4f 72 70 68 61 6e 65 64 50 72 69 6d 61 72 79 54 6f 75 63 68 20 3d chState.isOrphanedPrimaryTouch.=
a300 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 6e 65 77 .false;......................new
a320 54 6f 75 63 68 53 74 61 74 65 2e 69 73 54 61 70 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 TouchState.isTap.=.false;.......
a340 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 61 70 20 63 6f 75 6e 74 73 20 61 .................//.Tap.counts.a
a360 72 65 20 70 72 65 73 65 72 76 65 64 20 66 72 6f 6d 20 70 72 69 6f 72 20 74 6f 75 63 68 65 73 20 re.preserved.from.prior.touches.
a380 6f 6e 20 74 68 65 20 73 61 6d 65 20 66 69 6e 67 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 on.the.same.finger..............
a3a0 20 20 20 20 20 20 20 20 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2e 74 61 70 43 6f 75 6e 74 20 .........newTouchState.tapCount.
a3c0 3d 20 63 75 72 72 65 6e 74 54 6f 75 63 68 53 74 61 74 65 2d 3e 74 61 70 43 6f 75 6e 74 3b 0d 0a =.currentTouchState->tapCount;..
a3e0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 61 6b 65 20 70 72 ......................//.Make.pr
a400 69 6d 61 72 79 20 74 6f 75 63 68 2c 20 69 66 20 74 68 65 72 65 27 73 20 6e 6f 6e 65 20 63 75 72 imary.touch,.if.there's.none.cur
a420 72 65 6e 74 6c 79 2e 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 rently.......................if.
a440 28 70 72 69 6d 61 72 79 54 6f 75 63 68 53 74 61 74 65 2d 3e 69 73 4e 6f 6e 65 45 6e 64 65 64 4f (primaryTouchState->isNoneEndedO
a460 72 43 61 6e 63 65 6c 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 rCanceled)......................
a480 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 6e 65 77 54 6f {..........................newTo
a4a0 75 63 68 53 74 61 74 65 2e 69 73 50 72 69 6d 61 72 79 54 6f 75 63 68 20 3d 20 74 72 75 65 3b 0d uchState.isPrimaryTouch.=.true;.
a4c0 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 49 6e 70 75 74 53 74 .........................InputSt
a4e0 61 74 65 2e 43 68 61 6e 67 65 28 70 72 69 6d 61 72 79 54 6f 75 63 68 2c 20 6e 65 77 54 6f 75 63 ate.Change(primaryTouch,.newTouc
a500 68 53 74 61 74 65 2c 20 65 76 65 6e 74 50 74 72 3a 20 65 76 65 6e 74 50 74 72 29 3b 0d 0a 20 20 hState,.eventPtr:.eventPtr);....
a520 20 20 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 20 20 20 20 20 ..................}.............
a540 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 74 61 74 65 2e 43 68 61 6e 67 65 28 74 6f 75 ...........InputState.Change(tou
a560 63 68 65 73 5b 69 5d 2c 20 6e 65 77 54 6f 75 63 68 53 74 61 74 65 2c 20 65 76 65 6e 74 50 74 72 ches[i],.newTouchState,.eventPtr
a580 3a 20 65 76 65 6e 74 50 74 72 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 :.eventPtr);....................
a5a0 20 20 20 20 50 72 6f 66 69 6c 65 72 2e 45 6e 64 53 61 6d 70 6c 65 28 29 3b 0d 0a 20 20 20 20 20 ....Profiler.EndSample();.......
a5c0 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 20 20 20 ...............return;..........
a5e0 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 ........}..............}........
a600 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 72 61 6e 20 6f 75 74 20 6f 66 20 73 74 61 74 65 20 61 ........//.We.ran.out.of.state.a
a620 6e 64 20 77 65 20 64 6f 6e 27 74 20 77 61 6e 74 20 74 6f 20 73 74 6f 6d 70 20 61 6e 20 65 78 69 nd.we.don't.want.to.stomp.an.exi
a640 73 74 69 6e 67 20 6f 6e 67 6f 69 6e 67 20 74 6f 75 63 68 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 sting.ongoing.touch.............
a660 20 20 2f 2f 20 44 72 6f 70 20 74 68 69 73 20 74 6f 75 63 68 20 65 6e 74 69 72 65 6c 79 2e 0d 0a ..//.Drop.this.touch.entirely...
a680 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 47 65 74 74 69 6e 67 20 68 65 72 ............//.NOTE:.Getting.her
a6a0 65 20 6d 65 61 6e 73 20 77 65 27 72 65 20 68 61 76 69 6e 67 20 66 65 77 65 72 20 74 6f 75 63 68 e.means.we're.having.fewer.touch
a6c0 20 65 6e 74 72 69 65 73 20 74 68 61 6e 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 63 6f 6e 63 .entries.than.the.number.of.conc
a6e0 75 72 72 65 6e 74 20 74 6f 75 63 68 65 73 20 73 75 70 70 6f 72 74 65 64 0d 0a 20 20 20 20 20 20 urrent.touches.supported........
a700 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 62 79 20 74 68 65 20 62 61 63 6b 65 6e 64 20 28 6f ......//.......by.the.backend.(o
a720 72 20 73 6f 6d 65 6f 6e 65 20 69 73 20 73 69 6d 70 6c 79 20 73 65 6e 64 69 6e 67 20 75 73 20 6e r.someone.is.simply.sending.us.n
a740 6f 6e 73 65 6e 73 65 20 64 61 74 61 29 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 50 72 onsense.data).................Pr
a760 6f 66 69 6c 65 72 2e 45 6e 64 53 61 6d 70 6c 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a ofiler.EndSample();..........}..
a780 0d 0a 20 20 20 20 20 20 20 20 76 6f 69 64 20 49 49 6e 70 75 74 53 74 61 74 65 43 61 6c 6c 62 61 ..........void.IInputStateCallba
a7a0 63 6b 52 65 63 65 69 76 65 72 2e 4f 6e 4e 65 78 74 55 70 64 61 74 65 28 29 0d 0a 20 20 20 20 20 ckReceiver.OnNextUpdate().......
a7c0 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4f 6e 4e 65 78 74 55 70 64 61 74 65 28 29 ...{..............OnNextUpdate()
a7e0 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 76 6f 69 64 20 49 49 6e ;..........}............void.IIn
a800 70 75 74 53 74 61 74 65 43 61 6c 6c 62 61 63 6b 52 65 63 65 69 76 65 72 2e 4f 6e 53 74 61 74 65 putStateCallbackReceiver.OnState
a820 45 76 65 6e 74 28 49 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 Event(InputEventPtr.eventPtr)...
a840 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4f 6e 53 74 61 74 65 45 76 65 .......{..............OnStateEve
a860 6e 74 28 65 76 65 6e 74 50 74 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 nt(eventPtr);..........}........
a880 20 20 20 20 75 6e 73 61 66 65 20 62 6f 6f 6c 20 49 49 6e 70 75 74 53 74 61 74 65 43 61 6c 6c 62 ....unsafe.bool.IInputStateCallb
a8a0 61 63 6b 52 65 63 65 69 76 65 72 2e 47 65 74 53 74 61 74 65 4f 66 66 73 65 74 46 6f 72 45 76 65 ackReceiver.GetStateOffsetForEve
a8c0 6e 74 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 72 6f 6c 2c 20 49 6e 70 75 74 45 76 nt(InputControl.control,.InputEv
a8e0 65 6e 74 50 74 72 20 65 76 65 6e 74 50 74 72 2c 20 72 65 66 20 75 69 6e 74 20 6f 66 66 73 65 74 entPtr.eventPtr,.ref.uint.offset
a900 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 2f 2f 20 54 68 69 )..........{..............//.Thi
a920 73 20 63 6f 64 65 20 67 6f 65 73 20 62 61 63 6b 20 74 6f 20 74 68 65 20 74 72 69 63 6b 65 72 79 s.code.goes.back.to.the.trickery
a940 20 77 65 20 70 65 72 66 6f 72 6d 20 69 6e 20 4f 6e 53 74 61 74 65 45 76 65 6e 74 2e 20 57 65 20 .we.perform.in.OnStateEvent..We.
a960 63 6f 6e 73 75 6d 65 20 65 76 65 6e 74 73 20 69 6e 20 54 6f 75 63 68 53 74 61 74 65 20 66 6f 72 consume.events.in.TouchState.for
a980 6d 61 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 69 6e 73 74 65 61 64 20 6f 66 20 69 mat..............//.instead.of.i
a9a0 6e 20 54 6f 75 63 68 73 63 72 65 65 6e 53 74 61 74 65 20 66 6f 72 6d 61 74 2e 20 54 68 69 73 20 n.TouchscreenState.format..This.
a9c0 6d 65 61 6e 73 20 74 68 61 74 20 74 68 65 20 69 6e 70 75 74 20 73 79 73 74 65 6d 20 64 6f 65 73 means.that.the.input.system.does
a9e0 20 6e 6f 74 20 6b 6e 6f 77 20 68 6f 77 20 74 68 65 20 73 74 61 74 65 20 69 6e 20 74 68 6f 73 65 .not.know.how.the.state.in.those
aa00 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 65 76 65 6e 74 73 20 63 6f 72 72 65 6c 61 74 ..............//.events.correlat
aa20 65 73 20 74 6f 20 74 68 65 20 63 6f 6e 74 72 6f 6c 73 20 77 65 20 68 61 76 65 2e 0d 0a 20 20 20 es.to.the.controls.we.have......
aa40 20 20 20 20 20 20 20 20 20 2f 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 54 68 69 73 .........//..............//.This
aa60 20 6d 65 74 68 6f 64 20 69 73 20 75 73 65 64 20 74 6f 20 67 69 76 65 20 74 68 65 20 69 6e 70 75 .method.is.used.to.give.the.inpu
aa80 74 20 73 79 73 74 65 6d 20 61 6e 20 6f 66 66 73 65 74 20 62 61 73 65 64 20 6f 6e 20 77 68 69 63 t.system.an.offset.based.on.whic
aaa0 68 20 74 68 65 20 69 6e 70 75 74 20 73 79 73 74 65 6d 20 63 61 6e 20 63 6f 6d 70 75 74 65 20 72 h.the.input.system.can.compute.r
aac0 65 6c 61 74 69 76 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 6f 66 66 73 65 74 73 20 elative..............//.offsets.
aae0 69 6e 74 6f 20 74 68 65 20 73 74 61 74 65 20 6f 66 20 65 76 65 6e 74 50 74 72 20 66 6f 72 20 63 into.the.state.of.eventPtr.for.c
ab00 6f 6e 74 72 6f 6c 73 20 74 68 61 74 20 61 72 65 20 70 61 72 74 20 6f 66 20 74 68 65 20 63 6f 6e ontrols.that.are.part.of.the.con
ab20 74 72 6f 6c 20 68 69 65 72 61 72 63 68 79 20 72 6f 6f 74 65 64 20 61 74 20 27 63 6f 6e 74 72 6f trol.hierarchy.rooted.at.'contro
ab40 6c 27 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 65 76 65 6e 74 50 74 72 l'.................if.(!eventPtr
ab60 2e 49 73 41 3c 53 74 61 74 65 45 76 65 6e 74 3e 28 29 20 7c 7c 20 53 74 61 74 65 45 76 65 6e 74 .IsA<StateEvent>().||.StateEvent
ab80 2e 46 72 6f 6d 28 65 76 65 6e 74 50 74 72 29 2d 3e 73 74 61 74 65 46 6f 72 6d 61 74 20 21 3d 20 .From(eventPtr)->stateFormat.!=.
aba0 54 6f 75 63 68 53 74 61 74 65 2e 46 6f 72 6d 61 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 TouchState.Format)..............
abc0 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;...............
abe0 20 2f 2f 20 54 68 65 20 6f 6e 6c 79 20 63 6f 6e 74 72 6f 6c 73 20 77 65 20 63 61 6e 20 72 65 61 .//.The.only.controls.we.can.rea
ac00 64 20 6f 75 74 20 66 72 6f 6d 20 61 20 54 6f 75 63 68 53 74 61 74 65 20 65 76 65 6e 74 20 61 72 d.out.from.a.TouchState.event.ar
ac20 65 20 74 68 6f 73 65 20 74 68 61 74 20 61 72 65 20 70 61 72 74 20 6f 66 20 54 6f 75 63 68 43 6f e.those.that.are.part.of.TouchCo
ac40 6e 74 72 6f 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 28 61 6e 64 20 70 61 72 74 20 ntrol..............//.(and.part.
ac60 6f 66 20 74 68 69 73 20 54 6f 75 63 68 73 63 72 65 65 6e 29 2e 0d 0a 20 20 20 20 20 20 20 20 20 of.this.Touchscreen)............
ac80 20 20 20 76 61 72 20 74 6f 75 63 68 43 6f 6e 74 72 6f 6c 20 3d 20 63 6f 6e 74 72 6f 6c 2e 46 69 ...var.touchControl.=.control.Fi
aca0 6e 64 49 6e 50 61 72 65 6e 74 43 68 61 69 6e 3c 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 3e 28 29 3b ndInParentChain<TouchControl>();
acc0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 74 6f 75 63 68 43 6f 6e 74 72 6f 6c 20 3d ..............if.(touchControl.=
ace0 3d 20 6e 75 6c 6c 20 7c 7c 20 74 6f 75 63 68 43 6f 6e 74 72 6f 6c 2e 70 61 72 65 6e 74 20 21 3d =.null.||.touchControl.parent.!=
ad00 20 74 68 69 73 29 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 66 .this)..................return.f
ad20 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 63 6f 75 6c 64 alse;................//.We.could
ad40 20 61 6c 6c 6f 77 20 2a 61 6e 79 2a 20 6f 66 20 74 68 65 20 54 6f 75 63 68 43 6f 6e 74 72 6f 6c .allow.*any*.of.the.TouchControl
ad60 73 20 6f 6e 20 74 68 65 20 54 6f 75 63 68 73 63 72 65 65 6e 20 68 65 72 65 2e 20 57 65 27 64 20 s.on.the.Touchscreen.here..We'd.
ad80 73 69 6d 70 6c 79 20 62 61 73 65 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 simply.base.the..............//.
ada0 6f 66 66 73 65 74 20 6f 6e 20 74 68 65 20 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 20 6f 66 20 74 68 offset.on.the.TouchControl.of.th
adc0 65 20 27 63 6f 6e 74 72 6f 6c 27 20 77 65 20 67 65 74 20 61 73 20 61 6e 20 61 72 67 75 6d 65 6e e.'control'.we.get.as.an.argumen
ade0 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 t...............//..............
ae00 2f 2f 20 48 6f 77 65 76 65 72 2c 20 64 6f 69 6e 67 20 74 68 61 74 20 77 6f 75 6c 64 20 6d 65 61 //.However,.doing.that.would.mea
ae20 6e 20 74 68 61 74 20 61 6c 6c 20 74 68 65 20 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 73 20 77 6f 75 n.that.all.the.TouchControls.wou
ae40 6c 64 20 6d 61 70 20 69 6e 74 6f 20 74 68 65 20 73 61 6d 65 20 69 6e 70 75 74 20 65 76 65 6e 74 ld.map.into.the.same.input.event
ae60 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 53 6f 20 77 68 65 6e 20 61 20 70 69 65 63 ...............//.So.when.a.piec
ae80 65 20 6f 66 20 63 6f 64 65 20 6c 69 6b 65 20 69 6e 20 49 6e 70 75 74 55 73 65 72 20 67 6f 65 73 e.of.code.like.in.InputUser.goes
aea0 20 61 6e 64 20 63 79 63 6c 65 73 20 74 68 72 6f 75 67 68 20 61 6c 6c 20 63 6f 6e 74 72 6f 6c 73 .and.cycles.through.all.controls
aec0 20 74 6f 20 64 65 74 65 72 6d 69 6e 65 20 6f 6e 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .to.determine.ones..............
aee0 2f 2f 20 74 68 61 74 20 68 61 76 65 20 63 68 61 6e 67 65 64 20 69 6e 20 61 6e 20 65 76 65 6e 74 //.that.have.changed.in.an.event
af00 2c 20 69 74 20 77 6f 75 6c 64 20 66 69 6e 64 20 74 68 61 74 20 69 6e 73 74 65 61 64 20 6f 66 20 ,.it.would.find.that.instead.of.
af20 61 20 73 69 6e 67 6c 65 20 74 6f 75 63 68 20 70 6f 73 69 74 69 6f 6e 20 76 61 6c 75 65 20 63 68 a.single.touch.position.value.ch
af40 61 6e 67 69 6e 67 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 61 6c 6c 20 6f 66 20 74 anging,..............//.all.of.t
af60 68 65 6d 20 77 6f 75 6c 64 20 62 65 20 63 68 61 6e 67 69 6e 67 20 66 72 6f 6d 20 74 68 65 20 73 hem.would.be.changing.from.the.s
af80 61 6d 65 20 73 69 6e 67 6c 65 20 65 76 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f ame.single.event.............../
afa0 2f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 6f 72 20 74 68 69 73 20 72 65 61 73 6f /..............//.For.this.reaso
afc0 6e 2c 20 77 65 20 6c 6f 63 6b 20 74 68 69 6e 67 73 20 64 6f 77 6e 20 74 6f 20 74 68 65 20 70 72 n,.we.lock.things.down.to.the.pr
afe0 69 6d 61 72 79 54 6f 75 63 68 20 63 6f 6e 74 72 6f 6c 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 imaryTouch.control..............
b000 20 20 20 69 66 20 28 74 6f 75 63 68 43 6f 6e 74 72 6f 6c 20 21 3d 20 70 72 69 6d 61 72 79 54 6f ...if.(touchControl.!=.primaryTo
b020 75 63 68 29 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 66 61 6c uch)..................return.fal
b040 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6f 66 66 73 65 74 20 3d 20 74 6f 75 63 se;................offset.=.touc
b060 68 43 6f 6e 74 72 6f 6c 2e 73 74 61 74 65 42 6c 6f 63 6b 2e 62 79 74 65 4f 66 66 73 65 74 3b 0d hControl.stateBlock.byteOffset;.
b080 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 .............return.true;.......
b0a0 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 63 61 6e 20 6f 6e 6c 79 20 64 ...}............//.We.can.only.d
b0c0 65 74 65 63 74 20 74 61 70 73 20 6f 6e 20 74 6f 75 63 68 20 2a 72 65 6c 65 61 73 65 2a 2e 20 41 etect.taps.on.touch.*release*..A
b0e0 74 20 77 68 69 63 68 20 70 6f 69 6e 74 20 69 74 20 61 63 74 73 20 6c 69 6b 65 20 61 20 62 75 74 t.which.point.it.acts.like.a.but
b100 74 6f 6e 20 74 68 61 74 20 74 72 69 67 67 65 72 73 20 61 6e 64 20 72 65 6c 65 61 73 65 73 0d 0a ton.that.triggers.and.releases..
b120 20 20 20 20 20 20 20 20 2f 2f 20 69 6e 20 6f 6e 65 20 6f 70 65 72 61 74 69 6f 6e 2e 0d 0a 20 20 ........//.in.one.operation.....
b140 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 76 6f 69 64 20 54 72 69 67 67 65 ......private.static.void.Trigge
b160 72 54 61 70 28 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 72 6f 6c 2c 20 72 65 66 20 54 rTap(TouchControl.control,.ref.T
b180 6f 75 63 68 53 74 61 74 65 20 73 74 61 74 65 2c 20 49 6e 70 75 74 45 76 65 6e 74 50 74 72 20 65 ouchState.state,.InputEventPtr.e
b1a0 76 65 6e 74 50 74 72 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 ventPtr)..........{.............
b1c0 20 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 77 65 27 72 65 20 75 70 64 61 74 69 6e 67 20 74 68 65 20 .////REVIEW:.we're.updating.the.
b1e0 65 6e 74 69 72 65 20 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 20 68 65 72 65 3b 20 77 65 20 63 6f 75 entire.TouchControl.here;.we.cou
b200 6c 64 20 75 70 64 61 74 65 20 6a 75 73 74 20 74 68 65 20 74 61 70 20 73 74 61 74 65 20 75 73 69 ld.update.just.the.tap.state.usi
b220 6e 67 20 61 20 64 65 6c 74 61 20 65 76 65 6e 74 3b 20 70 72 6f 62 6c 65 6d 0d 0a 20 20 20 20 20 ng.a.delta.event;.problem.......
b240 20 20 20 20 20 20 20 2f 2f 2f 2f 20 20 20 20 20 20 20 20 69 73 20 74 68 61 74 20 74 68 65 20 74 .......////........is.that.the.t
b260 61 70 20 2a 64 6f 77 6e 2a 20 73 74 69 6c 6c 20 6e 65 65 64 73 20 61 20 66 75 6c 6c 20 75 70 64 ap.*down*.still.needs.a.full.upd
b280 61 74 65 20 6f 6e 20 74 68 65 20 73 74 61 74 65 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ate.on.the.state................
b2a0 2f 2f 20 57 65 20 64 6f 6e 27 74 20 69 6e 63 72 65 61 73 65 20 74 61 70 43 6f 75 6e 74 20 68 65 //.We.don't.increase.tapCount.he
b2c0 72 65 20 61 73 20 77 65 20 6d 61 79 20 62 65 20 73 65 6e 64 69 6e 67 20 74 68 65 20 74 61 70 20 re.as.we.may.be.sending.the.tap.
b2e0 66 72 6f 6d 20 74 68 65 20 73 61 6d 65 20 73 74 61 74 65 20 74 6f 20 62 6f 74 68 20 74 68 65 20 from.the.same.state.to.both.the.
b300 54 6f 75 63 68 43 6f 6e 74 72 6f 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 74 68 61 TouchControl..............//.tha
b320 74 20 67 6f 74 20 74 61 70 70 65 64 20 61 6e 64 20 74 6f 20 70 72 69 6d 61 72 79 54 6f 75 63 68 t.got.tapped.and.to.primaryTouch
b340 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 72 65 73 73 2e 0d 0a 20 20 20 20 .................//.Press.......
b360 20 20 20 20 20 20 20 20 73 74 61 74 65 2e 69 73 54 61 70 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 ........state.isTap.=.true;.....
b380 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 74 61 74 65 2e 43 68 61 6e 67 65 28 63 6f 6e 74 72 .........InputState.Change(contr
b3a0 6f 6c 2c 20 73 74 61 74 65 2c 20 65 76 65 6e 74 50 74 72 3a 20 65 76 65 6e 74 50 74 72 29 3b 0d ol,.state,.eventPtr:.eventPtr);.
b3c0 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 6c 65 61 73 65 2e 0d 0a 20 20 20 20 ...............//.Release.......
b3e0 20 20 20 20 20 20 20 20 73 74 61 74 65 2e 69 73 54 61 70 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 ........state.isTap.=.false;....
b400 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 74 61 74 65 2e 43 68 61 6e 67 65 28 63 6f 6e 74 ..........InputState.Change(cont
b420 72 6f 6c 2c 20 73 74 61 74 65 2c 20 65 76 65 6e 74 50 74 72 3a 20 65 76 65 6e 74 50 74 72 29 3b rol,.state,.eventPtr:.eventPtr);
b440 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 ..........}............internal.
b460 73 74 61 74 69 63 20 66 6c 6f 61 74 20 73 5f 54 61 70 54 69 6d 65 3b 0d 0a 20 20 20 20 20 20 20 static.float.s_TapTime;.........
b480 20 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 66 6c 6f 61 74 20 73 5f 54 61 70 44 65 6c 61 .internal.static.float.s_TapDela
b4a0 79 54 69 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 yTime;..........internal.static.
b4c0 66 6c 6f 61 74 20 73 5f 54 61 70 52 61 64 69 75 73 53 71 75 61 72 65 64 3b 0d 0a 20 20 20 20 7d float.s_TapRadiusSquared;......}
b4e0 0d 0a 7d 0d 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0b 00 00 00 ..}.............................
b500 54 6f 75 63 68 73 63 72 65 65 6e 00 17 00 00 00 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 Touchscreen.....UnityEngine.Inpu
b520 74 53 79 73 74 65 6d 00 tSystem.