| ofs | hex dump | ascii |
|---|
| 0000 | 00 00 0f 97 00 01 65 f0 00 00 00 15 00 00 10 00 00 00 00 00 32 30 31 39 2e 33 2e 36 66 31 00 fe | ......e.............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 | 90 55 01 00 01 00 00 00 00 00 00 00 01 00 00 00 00 04 62 a5 98 a6 f0 43 b1 9b 65 9e c0 95 20 a5 | .U................b....C..e..... |
| 0fa0 | 92 03 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 | 9c ff 00 00 01 00 00 00 80 b9 2a 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 50 6c 61 79 65 72 49 6e 70 75 74 00 11 55 01 00 75 73 69 6e | ............PlayerInput..U..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 43 6f 6c 6c 65 63 74 69 | g.System;..using.System.Collecti |
| 10c0 | 6f 6e 73 2e 47 65 6e 65 72 69 63 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e | ons.Generic;..using.UnityEngine. |
| 10e0 | 45 76 65 6e 74 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 | Events;..using.UnityEngine.Input |
| 1100 | 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 79 45 6e 67 | System.LowLevel;..using.UnityEng |
| 1120 | 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 55 73 65 72 73 3b 0d 0a 75 73 69 6e 67 20 55 6e | ine.InputSystem.Users;..using.Un |
| 1140 | 69 74 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 | ityEngine.InputSystem.Utilities; |
| 1160 | 0d 0a 0d 0a 23 69 66 20 50 41 43 4b 41 47 45 5f 44 4f 43 53 5f 47 45 4e 45 52 41 54 49 4f 4e 20 | ....#if.PACKAGE_DOCS_GENERATION. |
| 1180 | 7c 7c 20 55 4e 49 54 59 5f 49 4e 50 55 54 5f 53 59 53 54 45 4d 5f 45 4e 41 42 4c 45 5f 55 49 0d | ||.UNITY_INPUT_SYSTEM_ENABLE_UI. |
| 11a0 | 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 65 6d 2e 55 | .using.UnityEngine.InputSystem.U |
| 11c0 | 49 3b 0d 0a 23 65 6e 64 69 66 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 61 6c 6c 6f 77 20 50 6c | I;..#endif....////TODO:.allow.Pl |
| 11e0 | 61 79 65 72 49 6e 70 75 74 20 74 6f 20 62 65 20 73 65 74 20 75 70 20 69 6e 20 61 20 77 61 79 20 | ayerInput.to.be.set.up.in.a.way. |
| 1200 | 77 68 65 72 65 20 69 74 27 73 20 69 6e 20 61 6e 20 75 6e 70 61 69 72 65 64 2f 6e 6f 6e 2d 66 75 | where.it's.in.an.unpaired/non-fu |
| 1220 | 6e 63 74 69 6f 6e 61 6c 20 73 74 61 74 65 20 61 6e 64 20 65 78 70 65 63 74 73 20 61 64 64 69 74 | nctional.state.and.expects.addit |
| 1240 | 69 6f 6e 61 6c 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 0d 0a 0d 0a 2f 2f 2f 2f 52 45 56 49 45 | ional.configuration....////REVIE |
| 1260 | 57 3a 20 68 61 76 69 6e 67 20 65 76 65 72 79 74 68 69 6e 67 20 63 6f 75 70 6c 65 64 20 74 6f 20 | W:.having.everything.coupled.to. |
| 1280 | 63 6f 6d 70 6f 6e 65 6e 74 20 65 6e 61 62 6c 65 2f 64 69 73 61 62 6c 65 20 69 73 20 71 75 69 74 | component.enable/disable.is.quit |
| 12a0 | 65 20 72 65 73 74 72 69 63 74 69 76 65 3b 20 63 61 6e 20 77 65 20 61 6c 6c 6f 77 20 50 6c 61 79 | e.restrictive;.can.we.allow.Play |
| 12c0 | 65 72 49 6e 70 75 74 73 0d 0a 2f 2f 2f 2f 20 20 20 20 20 20 20 20 74 6f 20 62 65 20 64 69 73 61 | erInputs..////........to.be.disa |
| 12e0 | 62 6c 65 64 20 77 69 74 68 6f 75 74 20 74 68 65 6d 20 6c 65 61 76 69 6e 67 20 74 68 65 20 67 61 | bled.without.them.leaving.the.ga |
| 1300 | 6d 65 3f 20 77 6f 75 6c 64 20 68 65 6c 70 20 77 68 65 6e 20 77 61 6e 74 69 6e 67 20 74 6f 20 6b | me?.would.help.when.wanting.to.k |
| 1320 | 65 65 70 20 70 6c 61 79 65 72 73 20 61 72 6f 75 6e 64 20 69 6e 20 74 68 65 20 62 61 63 6b 67 72 | eep.players.around.in.the.backgr |
| 1340 | 6f 75 6e 64 0d 0a 2f 2f 2f 2f 20 20 20 20 20 20 20 20 61 6e 64 20 6f 6e 6c 79 20 74 65 6d 70 6f | ound..////........and.only.tempo |
| 1360 | 72 61 72 69 6c 79 20 64 69 73 61 62 6c 65 20 74 68 65 6d 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a | rarily.disable.them....////TODO: |
| 1380 | 20 61 64 64 20 73 75 70 70 6f 72 74 20 66 6f 72 20 22 63 6f 6e 74 69 6e 75 6f 75 73 22 20 63 61 | .add.support.for."continuous".ca |
| 13a0 | 6c 6c 62 61 63 6b 73 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 61 64 64 20 65 76 65 6e 74 20 66 | llbacks....////TODO:.add.event.f |
| 13c0 | 6f 72 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 73 77 69 74 63 68 65 73 0d 0a 0d 0a 2f 2f | or.control.scheme.switches....// |
| 13e0 | 2f 2f 54 4f 44 4f 3a 20 61 64 64 20 61 62 69 6c 69 74 79 20 74 6f 20 6e 61 6d 65 20 70 6c 61 79 | //TODO:.add.ability.to.name.play |
| 1400 | 65 72 73 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 72 65 66 72 65 73 68 20 63 61 63 68 65 73 20 | ers....////TODO:.refresh.caches. |
| 1420 | 77 68 65 6e 20 61 73 73 65 74 20 69 73 20 6d 6f 64 69 66 69 65 64 20 61 74 20 72 75 6e 74 69 6d | when.asset.is.modified.at.runtim |
| 1440 | 65 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 68 61 6e 64 6c 65 20 72 65 71 75 69 72 65 64 20 61 | e....////TODO:.handle.required.a |
| 1460 | 63 74 69 6f 6e 73 20 61 68 65 61 64 20 6f 66 20 74 69 6d 65 20 73 6f 20 74 68 61 74 20 77 65 20 | ctions.ahead.of.time.so.that.we. |
| 1480 | 63 61 74 63 68 20 69 74 20 69 66 20 61 20 64 65 76 69 63 65 20 6d 61 74 63 68 65 73 20 62 79 20 | catch.it.if.a.device.matches.by. |
| 14a0 | 74 79 70 65 20 62 75 74 20 64 6f 65 73 6e 27 74 20 6f 74 68 65 72 77 69 73 65 0d 0a 0d 0a 2f 2f | type.but.doesn't.otherwise....// |
| 14c0 | 2f 2f 54 4f 44 4f 3a 20 68 61 6e 64 6c 65 20 63 61 73 65 20 6f 66 20 63 6f 6e 74 72 6f 6c 20 73 | //TODO:.handle.case.of.control.s |
| 14e0 | 63 68 65 6d 65 20 6e 6f 74 20 68 61 76 69 6e 67 20 61 6e 79 20 64 65 76 69 63 65 73 20 69 6e 20 | cheme.not.having.any.devices.in. |
| 1500 | 69 74 73 20 72 65 71 75 69 72 65 6d 65 6e 74 73 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 61 64 | its.requirements....////TODO:.ad |
| 1520 | 64 20 6d 65 74 68 6f 64 20 74 6f 20 70 61 73 73 20 61 6e 20 6f 62 6a 65 63 74 20 69 6d 70 6c 65 | d.method.to.pass.an.object.imple |
| 1540 | 6d 65 6e 74 69 6e 67 20 61 20 67 65 6e 65 72 61 74 65 64 20 61 63 74 69 6f 6e 20 69 6e 74 65 72 | menting.a.generated.action.inter |
| 1560 | 66 61 63 65 20 28 49 58 58 58 41 63 74 69 6f 6e 73 29 20 61 6e 64 20 68 61 76 65 20 69 74 20 68 | face.(IXXXActions).and.have.it.h |
| 1580 | 6f 6f 6b 65 64 20 75 70 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 0d 0a 2f 2f 2f 2f 20 20 20 20 | ooked.up.automatically..////.... |
| 15a0 | 20 20 28 6f 72 20 6d 61 79 62 65 20 6c 6f 6f 6b 20 66 6f 72 20 69 6d 70 6c 65 6d 65 6e 74 61 74 | ..(or.maybe.look.for.implementat |
| 15c0 | 69 6f 6e 20 6f 6e 20 63 6f 6d 70 6f 6e 65 6e 74 73 20 69 6e 20 73 61 6d 65 20 6f 62 6a 65 63 74 | ion.on.components.in.same.object |
| 15e0 | 3f 29 0d 0a 0d 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 77 61 72 6e 20 69 66 20 63 6f 6e 74 72 6f 6c 20 | ?)....////TODO:.warn.if.control. |
| 1600 | 73 63 68 65 6d 65 73 20 68 61 76 65 20 6e 6f 20 64 65 76 69 63 65 20 72 65 71 75 69 72 65 6d 65 | schemes.have.no.device.requireme |
| 1620 | 6e 74 73 0d 0a 0d 0a 2f 2f 2f 2f 46 49 58 4d 45 3a 20 77 68 79 20 63 61 6e 27 74 20 49 20 6a 6f | nts....////FIXME:.why.can't.I.jo |
| 1640 | 69 6e 20 77 69 74 68 20 61 20 6d 6f 75 73 65 20 6c 65 66 74 20 63 6c 69 63 6b 3f 0d 0a 0d 0a 6e | in.with.a.mouse.left.click?....n |
| 1660 | 61 6d 65 73 70 61 63 65 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d | amespace.UnityEngine.InputSystem |
| 1680 | 0d 0a 7b 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f 2f 20 | ..{......///.<summary>......///. |
| 16a0 | 52 65 70 72 65 73 65 6e 74 73 20 61 20 73 65 70 61 72 61 74 65 20 70 6c 61 79 65 72 20 69 6e 20 | Represents.a.separate.player.in. |
| 16c0 | 74 68 65 20 67 61 6d 65 20 63 6f 6d 70 6c 65 74 65 20 77 69 74 68 20 61 20 73 65 74 20 6f 66 20 | the.game.complete.with.a.set.of. |
| 16e0 | 61 63 74 69 6f 6e 73 20 65 78 63 6c 75 73 69 76 65 0d 0a 20 20 20 20 2f 2f 2f 20 74 6f 20 74 68 | actions.exclusive......///.to.th |
| 1700 | 65 20 70 6c 61 79 65 72 20 61 6e 64 20 61 20 73 65 74 20 6f 66 20 70 61 69 72 65 64 20 64 65 76 | e.player.and.a.set.of.paired.dev |
| 1720 | 69 63 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 2f 2f | ice.......///.</summary>......// |
| 1740 | 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 2f 2f 2f 20 50 6c 61 79 65 72 49 6e 70 75 74 | /.<remarks>......///.PlayerInput |
| 1760 | 20 69 73 20 61 20 68 69 67 68 2d 6c 65 76 65 6c 20 77 72 61 70 70 65 72 20 61 72 6f 75 6e 64 20 | .is.a.high-level.wrapper.around. |
| 1780 | 6d 75 63 68 20 6f 66 20 74 68 65 20 69 6e 70 75 74 20 73 79 73 74 65 6d 27 73 20 66 75 6e 63 74 | much.of.the.input.system's.funct |
| 17a0 | 69 6f 6e 61 6c 69 74 79 0d 0a 20 20 20 20 2f 2f 2f 20 77 68 69 63 68 20 69 73 20 6d 65 61 6e 74 | ionality......///.which.is.meant |
| 17c0 | 20 74 6f 20 68 65 6c 70 20 67 65 74 74 69 6e 67 20 73 65 74 20 75 70 20 77 69 74 68 20 74 68 65 | .to.help.getting.set.up.with.the |
| 17e0 | 20 6e 65 77 20 69 6e 70 75 74 20 73 79 73 74 65 6d 20 71 75 69 63 6b 6c 79 2e 20 49 74 20 74 61 | .new.input.system.quickly..It.ta |
| 1800 | 6b 65 73 0d 0a 20 20 20 20 2f 2f 2f 20 63 61 72 65 20 6f 66 20 3c 73 65 65 20 63 72 65 66 3d 22 | kes......///.care.of.<see.cref=" |
| 1820 | 49 6e 70 75 74 41 63 74 69 6f 6e 22 2f 3e 20 62 6f 6f 6b 6b 65 65 70 69 6e 67 20 61 6e 64 20 68 | InputAction"/>.bookkeeping.and.h |
| 1840 | 61 73 20 61 20 63 75 73 74 6f 6d 20 55 49 28 72 65 71 75 69 72 65 73 20 74 68 65 20 22 55 6e 69 | as.a.custom.UI(requires.the."Uni |
| 1860 | 74 79 20 55 49 22 20 70 61 63 6b 61 67 65 29 20 74 6f 20 68 65 6c 70 0d 0a 20 20 20 20 2f 2f 2f | ty.UI".package).to.help....../// |
| 1880 | 20 73 65 74 74 69 6e 67 20 75 70 20 69 6e 70 75 74 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 | .setting.up.input.......///..... |
| 18a0 | 20 2f 2f 2f 20 54 68 65 20 63 6f 6d 70 6f 6e 65 6e 74 20 73 75 70 70 6f 72 74 73 20 6c 6f 63 61 | .///.The.component.supports.loca |
| 18c0 | 6c 20 6d 75 6c 74 69 70 6c 61 79 65 72 20 69 6d 70 6c 69 63 69 74 6c 79 2e 20 45 61 63 68 20 50 | l.multiplayer.implicitly..Each.P |
| 18e0 | 6c 61 79 65 72 49 6e 70 75 74 20 69 6e 73 74 61 6e 63 65 0d 0a 20 20 20 20 2f 2f 2f 20 72 65 70 | layerInput.instance......///.rep |
| 1900 | 72 65 73 65 6e 74 73 20 61 20 64 69 73 74 69 6e 63 74 20 75 73 65 72 20 77 69 74 68 20 69 74 73 | resents.a.distinct.user.with.its |
| 1920 | 20 6f 77 6e 20 73 65 74 20 6f 66 20 64 65 76 69 63 65 73 20 61 6e 64 20 61 63 74 69 6f 6e 73 2e | .own.set.of.devices.and.actions. |
| 1940 | 20 54 6f 20 6f 72 63 68 65 73 74 72 61 74 65 0d 0a 20 20 20 20 2f 2f 2f 20 70 6c 61 79 65 72 20 | .To.orchestrate......///.player. |
| 1960 | 6d 61 6e 61 67 65 6d 65 6e 74 20 61 6e 64 20 66 61 63 69 6c 69 74 61 74 65 20 6d 65 63 68 61 6e | management.and.facilitate.mechan |
| 1980 | 69 63 73 20 73 75 63 68 20 61 73 20 6a 6f 69 6e 69 6e 67 20 62 79 20 64 65 76 69 63 65 20 61 63 | ics.such.as.joining.by.device.ac |
| 19a0 | 74 69 76 69 74 79 2c 20 75 73 65 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 | tivity,.use......///.<see.cref=" |
| 19c0 | 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 50 6c 61 79 65 72 49 6e | UnityEngine.InputSystem.PlayerIn |
| 19e0 | 70 75 74 4d 61 6e 61 67 65 72 22 2f 3e 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f | putManager"/>.......///....../// |
| 1a00 | 20 54 68 65 20 77 61 79 20 50 6c 61 79 65 72 49 6e 70 75 74 20 6e 6f 74 69 66 69 65 73 20 73 63 | .The.way.PlayerInput.notifies.sc |
| 1a20 | 72 69 70 74 20 63 6f 64 65 20 6f 66 20 65 76 65 6e 74 73 20 69 73 20 64 65 74 65 72 6d 69 6e 65 | ript.code.of.events.is.determine |
| 1a40 | 64 20 62 79 20 3c 73 65 65 20 63 72 65 66 3d 22 6e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 | d.by.<see.cref="notificationBeha |
| 1a60 | 76 69 6f 72 22 2f 3e 2e 0d 0a 20 20 20 20 2f 2f 2f 20 42 79 20 64 65 66 61 75 6c 74 2c 20 74 68 | vior"/>.......///.By.default,.th |
| 1a80 | 69 73 20 69 73 20 73 65 74 20 74 6f 20 3c 73 65 65 20 63 72 65 66 3d 22 55 6e 69 74 79 45 6e 67 | is.is.set.to.<see.cref="UnityEng |
| 1aa0 | 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 | ine.InputSystem.PlayerNotificati |
| 1ac0 | 6f 6e 73 2e 53 65 6e 64 4d 65 73 73 61 67 65 73 22 2f 3e 20 77 68 69 63 68 20 77 69 6c 6c 20 75 | ons.SendMessages"/>.which.will.u |
| 1ae0 | 73 65 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 47 61 6d 65 4f 62 6a 65 63 | se......///.<see.cref="GameObjec |
| 1b00 | 74 2e 53 65 6e 64 4d 65 73 73 61 67 65 28 73 74 72 69 6e 67 2c 6f 62 6a 65 63 74 29 22 2f 3e 20 | t.SendMessage(string,object)"/>. |
| 1b20 | 74 6f 20 73 65 6e 64 20 6d 65 73 73 61 67 65 73 20 74 6f 20 74 68 65 20 3c 73 65 65 20 63 72 65 | to.send.messages.to.the.<see.cre |
| 1b40 | 66 3d 22 47 61 6d 65 4f 62 6a 65 63 74 22 2f 3e 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 61 74 20 50 | f="GameObject"/>......///.that.P |
| 1b60 | 6c 61 79 65 72 49 6e 70 75 74 20 73 69 74 73 20 6f 6e 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 | layerInput.sits.on.......///.... |
| 1b80 | 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 6f 64 65 3e 0d | ..///.<example>......///.<code>. |
| 1ba0 | 0a 20 20 20 20 2f 2f 2f 20 2f 2f 20 43 6f 6d 70 6f 6e 65 6e 74 20 74 6f 20 73 69 74 20 6e 65 78 | .....///.//.Component.to.sit.nex |
| 1bc0 | 74 20 74 6f 20 50 6c 61 79 65 72 49 6e 70 75 74 2e 0d 0a 20 20 20 20 2f 2f 2f 20 5b 52 65 71 75 | t.to.PlayerInput.......///.[Requ |
| 1be0 | 69 72 65 43 6f 6d 70 6f 6e 65 6e 74 28 74 79 70 65 6f 66 28 50 6c 61 79 65 72 49 6e 70 75 74 29 | ireComponent(typeof(PlayerInput) |
| 1c00 | 29 5d 0d 0a 20 20 20 20 2f 2f 2f 20 70 75 62 6c 69 63 20 63 6c 61 73 73 20 4d 79 50 6c 61 79 65 | )]......///.public.class.MyPlaye |
| 1c20 | 72 4c 6f 67 69 63 20 3a 20 4d 6f 6e 6f 42 65 68 61 76 69 6f 75 72 0d 0a 20 20 20 20 2f 2f 2f 20 | rLogic.:.MonoBehaviour......///. |
| 1c40 | 7b 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 70 75 62 6c 69 63 20 47 61 6d 65 4f 62 6a 65 63 74 | {......///.....public.GameObject |
| 1c60 | 20 70 72 6f 6a 65 63 74 69 6c 65 50 72 65 66 61 62 3b 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 | .projectilePrefab;......///..... |
| 1c80 | 20 2f 2f 2f 20 20 20 20 20 70 72 69 76 61 74 65 20 56 65 63 74 6f 72 32 20 6d 5f 4c 6f 6f 6b 3b | .///.....private.Vector2.m_Look; |
| 1ca0 | 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 70 72 69 76 61 74 65 20 56 65 63 74 6f 72 32 20 6d 5f | ......///.....private.Vector2.m_ |
| 1cc0 | 4d 6f 76 65 3b 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 | Move;......///.....private.bool. |
| 1ce0 | 6d 5f 46 69 72 65 3b 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 2f 2f | m_Fire;......///......///.....// |
| 1d00 | 20 27 46 69 72 65 27 20 69 6e 70 75 74 20 61 63 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 74 72 | .'Fire'.input.action.has.been.tr |
| 1d20 | 69 67 67 65 72 65 64 2e 20 46 6f 72 20 27 46 69 72 65 27 20 77 65 20 77 61 6e 74 20 63 6f 6e 74 | iggered..For.'Fire'.we.want.cont |
| 1d40 | 69 6e 75 6f 75 73 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 2f 2f 20 61 63 74 69 6f 6e 20 28 69 | inuous......///.....//.action.(i |
| 1d60 | 2e 65 2e 20 66 69 72 69 6e 67 29 20 77 68 69 6c 65 20 74 68 65 20 66 69 72 65 20 62 75 74 74 6f | .e..firing).while.the.fire.butto |
| 1d80 | 6e 20 69 73 20 68 65 6c 64 20 73 75 63 68 20 74 68 61 74 20 74 68 65 20 61 63 74 69 6f 6e 0d 0a | n.is.held.such.that.the.action.. |
| 1da0 | 20 20 20 20 2f 2f 2f 20 20 20 20 20 2f 2f 20 67 65 74 73 20 74 72 69 67 67 65 72 65 64 20 72 65 | ....///.....//.gets.triggered.re |
| 1dc0 | 70 65 61 74 65 64 6c 79 20 77 68 69 6c 65 20 74 68 65 20 62 75 74 74 6f 6e 20 69 73 20 64 6f 77 | peatedly.while.the.button.is.dow |
| 1de0 | 6e 2e 20 57 65 20 63 61 6e 20 65 61 73 69 6c 79 20 73 65 74 20 74 68 69 73 0d 0a 20 20 20 20 2f | n..We.can.easily.set.this....../ |
| 1e00 | 2f 2f 20 20 20 20 20 2f 2f 20 75 70 20 62 79 20 68 61 76 69 6e 67 20 61 20 22 50 72 65 73 73 22 | //.....//.up.by.having.a."Press" |
| 1e20 | 20 69 6e 74 65 72 61 63 74 69 6f 6e 20 6f 6e 20 74 68 65 20 62 75 74 74 6f 6e 20 61 6e 64 20 73 | .interaction.on.the.button.and.s |
| 1e40 | 65 74 74 69 6e 67 20 69 74 20 74 6f 20 72 65 70 65 61 74 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 | etting.it.to.repeat......///.... |
| 1e60 | 20 2f 2f 20 61 74 20 66 69 78 65 64 20 69 6e 74 65 72 76 61 6c 73 2e 0d 0a 20 20 20 20 2f 2f 2f | .//.at.fixed.intervals......./// |
| 1e80 | 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 4f 6e 46 69 72 65 28 29 0d 0a 20 20 20 20 2f | .....public.void.OnFire()....../ |
| 1ea0 | 2f 2f 20 20 20 20 20 7b 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 49 6e 73 74 61 6e | //.....{......///.........Instan |
| 1ec0 | 74 69 61 74 65 28 70 72 6f 6a 65 63 74 69 6c 65 50 72 65 66 61 62 29 3b 0d 0a 20 20 20 20 2f 2f | tiate(projectilePrefab);......// |
| 1ee0 | 2f 20 20 20 20 20 7d 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 2f 2f | /.....}......///......///.....// |
| 1f00 | 20 27 4d 6f 76 65 27 20 69 6e 70 75 74 20 61 63 74 69 6f 6e 20 68 61 73 20 62 65 65 6e 20 74 72 | .'Move'.input.action.has.been.tr |
| 1f20 | 69 67 67 65 72 65 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 | iggered.......///.....public.voi |
| 1f40 | 64 20 4f 6e 4d 6f 76 65 28 49 6e 70 75 74 56 61 6c 75 65 20 76 61 6c 75 65 29 0d 0a 20 20 20 20 | d.OnMove(InputValue.value)...... |
| 1f60 | 2f 2f 2f 20 20 20 20 20 7b 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 6d 5f 4d 6f 76 | ///.....{......///.........m_Mov |
| 1f80 | 65 20 3d 20 76 61 6c 75 65 2e 47 65 74 26 6c 74 3b 56 65 63 74 6f 72 32 26 67 74 3b 28 29 3b 0d | e.=.value.Get<Vector2>();. |
| 1fa0 | 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 7d 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f | .....///.....}......///....../// |
| 1fc0 | 20 20 20 20 20 2f 2f 20 27 4c 6f 6f 6b 27 20 69 6e 70 75 74 20 61 63 74 69 6f 6e 20 68 61 73 20 | .....//.'Look'.input.action.has. |
| 1fe0 | 62 65 65 6e 20 74 72 69 67 67 65 72 65 64 2e 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 70 75 62 | been.triggered.......///.....pub |
| 2000 | 6c 69 63 20 76 6f 69 64 20 4f 6e 4c 6f 6f 6b 28 49 6e 70 75 74 56 61 6c 75 65 20 76 61 6c 75 65 | lic.void.OnLook(InputValue.value |
| 2020 | 29 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 7b 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 | )......///.....{......///....... |
| 2040 | 20 20 6d 5f 4c 6f 6f 6b 20 3d 20 76 61 6c 75 65 2e 47 65 74 26 6c 74 3b 56 65 63 74 6f 72 32 26 | ..m_Look.=.value.Get<Vector2& |
| 2060 | 67 74 3b 28 29 3b 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 7d 0d 0a 20 20 20 20 2f 2f 2f 0d 0a | gt;();......///.....}......///.. |
| 2080 | 20 20 20 20 2f 2f 2f 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 4f 6e 55 70 64 61 74 65 | ....///.....public.void.OnUpdate |
| 20a0 | 28 29 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 7b 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 | ()......///.....{......///...... |
| 20c0 | 20 20 20 2f 2f 20 55 70 64 61 74 65 20 74 72 61 6e 73 66 6f 72 6d 20 66 72 6f 6d 20 6d 5f 4d 6f | ...//.Update.transform.from.m_Mo |
| 20e0 | 76 65 20 61 6e 64 20 6d 5f 4c 6f 6f 6b 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 7d 0d 0a 20 20 | ve.and.m_Look......///.....}.... |
| 2100 | 20 20 2f 2f 2f 20 7d 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 2f 2f | ..///.}......///.</code>......// |
| 2120 | 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 2f 2f 20 49 | /.</example>......///......///.I |
| 2140 | 74 20 69 73 20 61 6c 73 6f 20 70 6f 73 73 69 62 6c 65 20 74 6f 20 75 73 65 20 74 68 65 20 70 6f | t.is.also.possible.to.use.the.po |
| 2160 | 6c 6c 69 6e 67 20 41 50 49 20 6f 66 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 | lling.API.of.<see.cref="InputAct |
| 2180 | 69 6f 6e 22 2f 3e 73 20 28 73 65 65 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d | ion"/>s.(see......///.<see.cref= |
| 21a0 | 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e 74 72 69 67 67 65 72 65 64 22 2f 3e 20 61 6e 64 20 3c 73 | "InputAction.triggered"/>.and.<s |
| 21c0 | 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e 52 65 61 64 56 61 6c 75 65 7b 54 | ee.cref="InputAction.ReadValue{T |
| 21e0 | 56 61 6c 75 65 7d 22 2f 3e 29 0d 0a 20 20 20 20 2f 2f 2f 20 69 6e 20 63 6f 6d 62 69 6e 61 74 69 | Value}"/>)......///.in.combinati |
| 2200 | 6f 6e 20 77 69 74 68 20 50 6c 61 79 65 72 49 6e 70 75 74 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 | on.with.PlayerInput.......///... |
| 2220 | 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 6f 64 65 3e | ...///.<example>......///.<code> |
| 2240 | 0d 0a 20 20 20 20 2f 2f 2f 20 2f 2f 20 43 6f 6d 70 6f 6e 65 6e 74 20 74 6f 20 73 69 74 20 6e 65 | ......///.//.Component.to.sit.ne |
| 2260 | 78 74 20 74 6f 20 50 6c 61 79 65 72 49 6e 70 75 74 2e 0d 0a 20 20 20 20 2f 2f 2f 20 5b 52 65 71 | xt.to.PlayerInput.......///.[Req |
| 2280 | 75 69 72 65 43 6f 6d 70 6f 6e 65 6e 74 28 74 79 70 65 6f 66 28 50 6c 61 79 65 72 49 6e 70 75 74 | uireComponent(typeof(PlayerInput |
| 22a0 | 29 29 5d 0d 0a 20 20 20 20 2f 2f 2f 20 70 75 62 6c 69 63 20 63 6c 61 73 73 20 4d 79 50 6c 61 79 | ))]......///.public.class.MyPlay |
| 22c0 | 65 72 4c 6f 67 69 63 20 3a 20 4d 6f 6e 6f 42 65 68 61 76 69 6f 75 72 0d 0a 20 20 20 20 2f 2f 2f | erLogic.:.MonoBehaviour....../// |
| 22e0 | 20 7b 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 70 75 62 6c 69 63 20 47 61 6d 65 4f 62 6a 65 63 | .{......///.....public.GameObjec |
| 2300 | 74 20 70 72 6f 6a 65 63 74 69 6c 65 50 72 65 66 61 62 3b 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 | t.projectilePrefab;......///.... |
| 2320 | 20 20 2f 2f 2f 20 20 20 20 20 70 72 69 76 61 74 65 20 50 6c 61 79 65 72 49 6e 70 75 74 20 6d 5f | ..///.....private.PlayerInput.m_ |
| 2340 | 50 6c 61 79 65 72 49 6e 70 75 74 3b 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 70 72 69 76 61 74 | PlayerInput;......///.....privat |
| 2360 | 65 20 49 6e 70 75 74 41 63 74 69 6f 6e 20 6d 5f 4c 6f 6f 6b 41 63 74 69 6f 6e 3b 0d 0a 20 20 20 | e.InputAction.m_LookAction;..... |
| 2380 | 20 2f 2f 2f 20 20 20 20 20 70 72 69 76 61 74 65 20 49 6e 70 75 74 41 63 74 69 6f 6e 20 6d 5f 4d | .///.....private.InputAction.m_M |
| 23a0 | 6f 76 65 41 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 70 72 69 76 61 74 65 20 | oveAction;......///.....private. |
| 23c0 | 49 6e 70 75 74 41 63 74 69 6f 6e 20 6d 5f 46 69 72 65 41 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 2f | InputAction.m_FireAction;....../ |
| 23e0 | 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 4f 6e 55 70 | //......///.....public.void.OnUp |
| 2400 | 64 61 74 65 28 29 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 7b 0d 0a 20 20 20 20 2f 2f 2f 20 20 | date()......///.....{......///.. |
| 2420 | 20 20 20 20 20 20 20 2f 2f 20 46 69 72 73 74 20 75 70 64 61 74 65 20 77 65 20 6c 6f 6f 6b 20 75 | .......//.First.update.we.look.u |
| 2440 | 70 20 61 6c 6c 20 74 68 65 20 64 61 74 61 20 77 65 20 6e 65 65 64 2e 0d 0a 20 20 20 20 2f 2f 2f | p.all.the.data.we.need......./// |
| 2460 | 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 4f 54 45 3a 20 57 65 20 64 6f 6e 27 74 20 64 6f 20 74 68 | .........//.NOTE:.We.don't.do.th |
| 2480 | 69 73 20 69 6e 20 4f 6e 45 6e 61 62 6c 65 20 61 73 20 50 6c 61 79 65 72 49 6e 70 75 74 20 69 74 | is.in.OnEnable.as.PlayerInput.it |
| 24a0 | 73 65 6c 66 20 70 65 72 66 6f 72 6d 69 6e 67 20 73 6f 6d 65 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 | self.performing.some......///... |
| 24c0 | 20 20 20 20 20 20 2f 2f 20 20 20 20 20 20 20 69 6e 69 74 69 61 6c 69 7a 61 74 69 6f 6e 20 77 6f | ......//.......initialization.wo |
| 24e0 | 72 6b 20 69 6e 20 4f 6e 45 6e 61 62 6c 65 2e 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 | rk.in.OnEnable.......///........ |
| 2500 | 20 69 66 20 28 6d 5f 50 6c 61 79 65 72 49 6e 70 75 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 | .if.(m_PlayerInput.==.null)..... |
| 2520 | 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 | .///.........{......///......... |
| 2540 | 20 20 20 20 6d 5f 50 6c 61 79 65 72 49 6e 70 75 74 20 3d 20 47 65 74 43 6f 6d 70 6f 6e 65 6e 74 | ....m_PlayerInput.=.GetComponent |
| 2560 | 26 6c 74 3b 50 6c 61 79 65 72 49 6e 70 75 74 26 67 74 3b 28 29 3b 0d 0a 20 20 20 20 2f 2f 2f 20 | <PlayerInput>();......///. |
| 2580 | 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 46 69 72 65 41 63 74 69 6f 6e 20 3d 20 6d 5f 50 6c 61 | ............m_FireAction.=.m_Pla |
| 25a0 | 79 65 72 49 6e 70 75 74 2e 61 63 74 69 6f 6e 73 5b 22 66 69 72 65 22 5d 3b 0d 0a 20 20 20 20 2f | yerInput.actions["fire"];....../ |
| 25c0 | 2f 2f 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4c 6f 6f 6b 41 63 74 69 6f 6e 20 3d 20 6d 5f | //.............m_LookAction.=.m_ |
| 25e0 | 50 6c 61 79 65 72 49 6e 70 75 74 2e 61 63 74 69 6f 6e 73 5b 22 6c 6f 6f 6b 22 5d 3b 0d 0a 20 20 | PlayerInput.actions["look"];.... |
| 2600 | 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4d 6f 76 65 41 63 74 69 6f 6e 20 3d | ..///.............m_MoveAction.= |
| 2620 | 20 6d 5f 50 6c 61 79 65 72 49 6e 70 75 74 2e 61 63 74 69 6f 6e 73 5b 22 6d 6f 76 65 22 5d 3b 0d | .m_PlayerInput.actions["move"];. |
| 2640 | 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 | .....///.........}......///..... |
| 2660 | 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 46 69 72 65 41 63 74 69 6f 6e 2e 74 72 | .///.........if.(m_FireAction.tr |
| 2680 | 69 67 67 65 72 65 64 29 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2a | iggered)......///............./* |
| 26a0 | 20 66 69 72 69 6e 67 20 6c 6f 67 69 63 2e 2e 2e 20 2a 2f 3b 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 | .firing.logic....*/;......///... |
| 26c0 | 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 6f 76 65 20 3d 20 6d 5f 4d 6f 76 65 | ...///.........var.move.=.m_Move |
| 26e0 | 41 63 74 69 6f 6e 2e 52 65 61 64 56 61 6c 75 65 26 6c 74 3b 56 65 63 74 6f 72 32 26 67 74 3b 28 | Action.ReadValue<Vector2>( |
| 2700 | 29 3b 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 76 61 72 20 6c 6f 6f 6b 20 3d 20 6d | );......///.........var.look.=.m |
| 2720 | 5f 4c 6f 6f 6b 41 63 74 69 6f 6e 2e 52 65 61 64 56 61 6c 75 65 26 6c 74 3b 56 65 63 74 6f 72 32 | _LookAction.ReadValue<Vector2 |
| 2740 | 26 67 74 3b 28 29 3b 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 20 20 20 20 2f 2a 20 55 70 64 61 | >();......///........./*.Upda |
| 2760 | 74 65 20 74 72 61 6e 73 66 6f 72 6d 20 66 72 6f 6d 20 6d 6f 76 65 26 61 6d 70 3b 6c 6f 6f 6b 2e | te.transform.from.move&look. |
| 2780 | 2e 2e 20 2a 2f 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 7d 0d 0a 20 20 20 20 2f 2f 2f 20 7d 0d | ...*/......///.....}......///.}. |
| 27a0 | 0a 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 65 78 61 6d | .....///.</code>......///.</exam |
| 27c0 | 70 6c 65 3e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 65 6e 61 62 | ple>......///......///.When.enab |
| 27e0 | 6c 65 64 2c 20 50 6c 61 79 65 72 49 6e 70 75 74 20 77 69 6c 6c 20 63 72 65 61 74 65 20 61 6e 20 | led,.PlayerInput.will.create.an. |
| 2800 | 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 55 73 65 72 22 2f 3e 20 61 6e 64 20 70 61 69 72 | <see.cref="InputUser"/>.and.pair |
| 2820 | 20 64 65 76 69 63 65 73 20 74 6f 20 74 68 65 0d 0a 20 20 20 20 2f 2f 2f 20 75 73 65 72 20 77 68 | .devices.to.the......///.user.wh |
| 2840 | 69 63 68 20 61 72 65 20 74 68 65 6e 20 73 70 65 63 69 66 69 63 20 74 6f 20 74 68 65 20 70 6c 61 | ich.are.then.specific.to.the.pla |
| 2860 | 79 65 72 2e 20 54 68 65 20 73 65 74 20 6f 66 20 64 65 76 69 63 65 73 20 63 61 6e 20 62 65 20 63 | yer..The.set.of.devices.can.be.c |
| 2880 | 6f 6e 74 72 6f 6c 6c 65 64 20 65 78 70 6c 69 63 69 74 6c 79 0d 0a 20 20 20 20 2f 2f 2f 20 77 68 | ontrolled.explicitly......///.wh |
| 28a0 | 65 6e 20 69 6e 73 74 61 6e 74 69 61 74 69 6e 67 20 61 20 50 6c 61 79 65 72 49 6e 70 75 74 20 74 | en.instantiating.a.PlayerInput.t |
| 28c0 | 68 72 6f 75 67 68 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 73 74 61 6e 74 69 61 74 65 28 47 61 | hrough.<see.cref="Instantiate(Ga |
| 28e0 | 6d 65 4f 62 6a 65 63 74 2c 69 6e 74 2c 73 74 72 69 6e 67 2c 69 6e 74 2c 49 6e 70 75 74 44 65 76 | meObject,int,string,int,InputDev |
| 2900 | 69 63 65 5b 5d 29 22 2f 3e 0d 0a 20 20 20 20 2f 2f 2f 20 6f 72 20 3c 73 65 65 20 63 72 65 66 3d | ice[])"/>......///.or.<see.cref= |
| 2920 | 22 49 6e 73 74 61 6e 74 69 61 74 65 28 47 61 6d 65 4f 62 6a 65 63 74 2c 69 6e 74 2c 73 74 72 69 | "Instantiate(GameObject,int,stri |
| 2940 | 6e 67 2c 69 6e 74 2c 49 6e 70 75 74 44 65 76 69 63 65 29 22 2f 3e 2e 20 54 68 69 73 20 61 6c 73 | ng,int,InputDevice)"/>..This.als |
| 2960 | 6f 20 6d 61 6b 65 73 20 69 74 20 70 6f 73 73 69 62 6c 65 0d 0a 20 20 20 20 2f 2f 2f 20 74 6f 20 | o.makes.it.possible......///.to. |
| 2980 | 61 73 73 69 67 6e 20 74 68 65 20 73 61 6d 65 20 64 65 76 69 63 65 20 74 6f 20 74 77 6f 20 64 69 | assign.the.same.device.to.two.di |
| 29a0 | 66 66 65 72 65 6e 74 20 70 6c 61 79 65 72 73 2c 20 65 2e 67 2e 20 66 6f 72 20 73 70 6c 69 74 2d | fferent.players,.e.g..for.split- |
| 29c0 | 6b 65 79 62 6f 61 72 64 20 70 6c 61 79 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f | keyboard.play.......///....../// |
| 29e0 | 20 3c 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 63 6f 64 65 3e 0d 0a 20 20 20 20 | .<example>......///.<code>...... |
| 2a00 | 2f 2f 2f 20 76 61 72 20 70 31 20 3d 20 50 6c 61 79 65 72 49 6e 70 75 74 2e 49 6e 73 74 61 6e 74 | ///.var.p1.=.PlayerInput.Instant |
| 2a20 | 69 61 74 65 28 70 6c 61 79 65 72 50 72 65 66 61 62 2c 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 | iate(playerPrefab,......///..... |
| 2a40 | 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 3a 20 22 4b 65 79 62 6f 61 72 64 4c 65 66 74 22 2c 20 64 | controlScheme:."KeyboardLeft",.d |
| 2a60 | 65 76 69 63 65 3a 20 4b 65 79 62 6f 61 72 64 2e 63 75 72 72 65 6e 74 29 3b 0d 0a 20 20 20 20 2f | evice:.Keyboard.current);....../ |
| 2a80 | 2f 2f 20 76 61 72 20 70 32 20 3d 20 50 6c 61 79 65 72 49 6e 70 75 74 2e 49 6e 73 74 61 6e 74 69 | //.var.p2.=.PlayerInput.Instanti |
| 2aa0 | 61 74 65 28 70 6c 61 79 65 72 50 72 65 66 61 62 2c 0d 0a 20 20 20 20 2f 2f 2f 20 20 20 20 20 63 | ate(playerPrefab,......///.....c |
| 2ac0 | 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 3a 20 22 4b 65 79 62 6f 61 72 64 52 69 67 68 74 22 2c 20 64 | ontrolScheme:."KeyboardRight",.d |
| 2ae0 | 65 76 69 63 65 3a 20 4b 65 79 62 6f 61 72 64 2e 63 75 72 72 65 6e 74 29 3b 0d 0a 20 20 20 20 2f | evice:.Keyboard.current);....../ |
| 2b00 | 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 65 78 61 6d 70 6c 65 3e 0d 0a | //.</code>......///.</example>.. |
| 2b20 | 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 49 66 20 6e 6f 20 73 70 65 63 69 66 69 63 20 | ....///......///.If.no.specific. |
| 2b40 | 64 65 76 69 63 65 73 20 61 72 65 20 67 69 76 65 6e 20 74 6f 20 61 20 50 6c 61 79 65 72 49 6e 70 | devices.are.given.to.a.PlayerInp |
| 2b60 | 75 74 2c 20 74 68 65 20 63 6f 6d 70 6f 6e 65 6e 74 20 77 69 6c 6c 20 6c 6f 6f 6b 20 66 6f 72 20 | ut,.the.component.will.look.for. |
| 2b80 | 63 6f 6d 70 61 74 69 62 6c 65 0d 0a 20 20 20 20 2f 2f 2f 20 64 65 76 69 63 65 73 20 70 72 65 73 | compatible......///.devices.pres |
| 2ba0 | 65 6e 74 20 69 6e 20 74 68 65 20 73 79 73 74 65 6d 20 61 6e 64 20 70 61 69 72 20 74 68 65 6d 20 | ent.in.the.system.and.pair.them. |
| 2bc0 | 74 6f 20 69 74 73 65 6c 66 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 2e 20 49 66 20 74 68 65 20 | to.itself.automatically..If.the. |
| 2be0 | 50 6c 61 79 65 72 49 6e 70 75 74 27 73 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 | PlayerInput's......///.<see.cref |
| 2c00 | 3d 22 61 63 74 69 6f 6e 73 22 2f 3e 20 68 61 76 65 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 | ="actions"/>.have.control.scheme |
| 2c20 | 73 20 64 65 66 69 6e 65 64 20 66 6f 72 20 74 68 65 6d 2c 20 50 6c 61 79 65 72 49 6e 70 75 74 20 | s.defined.for.them,.PlayerInput. |
| 2c40 | 77 69 6c 6c 20 6c 6f 6f 6b 20 66 6f 72 20 61 0d 0a 20 20 20 20 2f 2f 2f 20 63 6f 6e 74 72 6f 6c | will.look.for.a......///.control |
| 2c60 | 20 73 63 68 65 6d 65 20 66 6f 72 20 77 68 69 63 68 20 61 6c 6c 20 72 65 71 75 69 72 65 64 20 64 | .scheme.for.which.all.required.d |
| 2c80 | 65 76 69 63 65 73 20 61 72 65 20 61 76 61 69 6c 61 62 6c 65 20 61 6e 64 20 6e 6f 74 20 70 61 69 | evices.are.available.and.not.pai |
| 2ca0 | 72 65 64 20 74 6f 20 61 6e 79 20 6f 74 68 65 72 20 70 6c 61 79 65 72 2e 0d 0a 20 20 20 20 2f 2f | red.to.any.other.player.......// |
| 2cc0 | 2f 20 49 74 20 77 69 6c 6c 20 74 72 79 20 3c 73 65 65 20 63 72 65 66 3d 22 64 65 66 61 75 6c 74 | /.It.will.try.<see.cref="default |
| 2ce0 | 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 22 2f 3e 20 66 69 72 73 74 20 28 69 66 20 73 65 74 29 2c | ControlScheme"/>.first.(if.set), |
| 2d00 | 20 62 75 74 20 74 68 65 6e 20 66 61 6c 6c 20 62 61 63 6b 20 74 6f 20 74 72 79 69 6e 67 0d 0a 20 | .but.then.fall.back.to.trying... |
| 2d20 | 20 20 20 2f 2f 2f 20 61 6c 6c 20 61 76 61 69 6c 61 62 6c 65 20 73 63 68 65 6d 65 73 20 69 6e 20 | ...///.all.available.schemes.in. |
| 2d40 | 6f 72 64 65 72 2e 20 4f 6e 63 65 20 61 20 73 63 68 65 6d 65 20 69 73 20 66 6f 75 6e 64 20 66 6f | order..Once.a.scheme.is.found.fo |
| 2d60 | 72 20 77 68 69 63 68 20 61 6c 6c 20 72 65 71 75 69 72 65 64 20 64 65 76 69 63 65 73 20 61 72 65 | r.which.all.required.devices.are |
| 2d80 | 0d 0a 20 20 20 20 2f 2f 2f 20 61 76 61 69 6c 61 62 6c 65 2c 20 50 6c 61 79 65 72 49 6e 70 75 74 | ......///.available,.PlayerInput |
| 2da0 | 20 77 69 6c 6c 20 70 61 69 72 20 74 68 6f 73 65 20 64 65 76 69 63 65 73 20 74 6f 20 69 74 73 65 | .will.pair.those.devices.to.itse |
| 2dc0 | 6c 66 20 61 6e 64 20 73 65 6c 65 63 74 20 74 68 65 20 67 69 76 65 6e 20 73 63 68 65 6d 65 2e 0d | lf.and.select.the.given.scheme.. |
| 2de0 | 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 49 66 20 6e 6f 20 63 6f 6e 74 72 6f 6c 20 | .....///......///.If.no.control. |
| 2e00 | 73 63 68 65 6d 65 73 20 61 72 65 20 64 65 66 69 6e 65 64 2c 20 50 6c 61 79 65 72 49 6e 70 75 74 | schemes.are.defined,.PlayerInput |
| 2e20 | 20 77 69 6c 6c 20 74 72 79 20 74 6f 20 62 69 6e 64 20 61 73 20 6d 61 6e 79 20 61 73 2d 6f 66 2d | .will.try.to.bind.as.many.as-of- |
| 2e40 | 79 65 74 20 75 6e 70 61 69 72 65 64 0d 0a 20 20 20 20 2f 2f 2f 20 64 65 76 69 63 65 73 20 74 6f | yet.unpaired......///.devices.to |
| 2e60 | 20 69 74 73 65 6c 66 20 61 73 20 69 74 20 63 61 6e 20 6d 61 74 63 68 20 74 6f 20 62 69 6e 64 69 | .itself.as.it.can.match.to.bindi |
| 2e80 | 6e 67 73 20 70 72 65 73 65 6e 74 20 69 6e 20 74 68 65 20 3c 73 65 65 20 63 72 65 66 3d 22 61 63 | ngs.present.in.the.<see.cref="ac |
| 2ea0 | 74 69 6f 6e 73 22 2f 3e 2e 20 54 68 69 73 20 6d 65 61 6e 73 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 | tions"/>..This.means......///.th |
| 2ec0 | 61 74 20 69 66 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 2c 20 74 68 65 72 65 27 73 20 62 69 6e 64 | at.if,.for.example,.there's.bind |
| 2ee0 | 69 6e 67 20 66 6f 72 20 62 6f 74 68 20 6b 65 79 62 6f 61 72 64 20 61 6e 64 20 67 61 6d 65 70 61 | ing.for.both.keyboard.and.gamepa |
| 2f00 | 64 20 61 6e 64 20 74 68 65 72 65 20 69 73 20 6f 6e 65 20 6b 65 79 62 6f 61 72 64 0d 0a 20 20 20 | d.and.there.is.one.keyboard..... |
| 2f20 | 20 2f 2f 2f 20 61 6e 64 20 74 77 6f 20 67 61 6d 65 70 61 64 73 20 61 76 61 69 6c 61 62 6c 65 20 | .///.and.two.gamepads.available. |
| 2f40 | 77 68 65 6e 20 50 6c 61 79 65 72 49 6e 70 75 74 20 69 73 20 65 6e 61 62 6c 65 64 2c 20 61 6c 6c | when.PlayerInput.is.enabled,.all |
| 2f60 | 20 74 68 72 65 65 20 64 65 76 69 63 65 73 20 77 69 6c 6c 20 62 65 20 70 61 69 72 65 64 20 74 6f | .three.devices.will.be.paired.to |
| 2f80 | 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 65 20 70 6c 61 79 65 72 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a | ......///.the.player.......///.. |
| 2fa0 | 20 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 74 68 61 74 20 77 68 65 6e 20 75 73 69 6e 67 20 3c 73 65 | ....///.Note.that.when.using.<se |
| 2fc0 | 65 20 63 72 65 66 3d 22 50 6c 61 79 65 72 49 6e 70 75 74 4d 61 6e 61 67 65 72 22 2f 3e 2c 20 64 | e.cref="PlayerInputManager"/>,.d |
| 2fe0 | 65 76 69 63 65 20 70 61 69 72 69 6e 67 20 74 6f 20 70 6c 61 79 65 72 73 20 69 73 20 63 6f 6e 74 | evice.pairing.to.players.is.cont |
| 3000 | 72 6f 6c 6c 65 64 0d 0a 20 20 20 20 2f 2f 2f 20 66 72 6f 6d 20 74 68 65 20 6a 6f 69 6e 69 6e 67 | rolled......///.from.the.joining |
| 3020 | 20 6c 6f 67 69 63 2e 20 49 6e 20 74 68 61 74 20 63 61 73 65 2c 20 50 6c 61 79 65 72 49 6e 70 75 | .logic..In.that.case,.PlayerInpu |
| 3040 | 74 20 77 69 6c 6c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 70 61 69 72 20 74 68 65 20 64 65 | t.will.automatically.pair.the.de |
| 3060 | 76 69 63 65 20 66 72 6f 6d 20 77 68 69 63 68 0d 0a 20 20 20 20 2f 2f 2f 20 74 68 65 20 70 6c 61 | vice.from.which......///.the.pla |
| 3080 | 79 65 72 20 6a 6f 69 6e 65 64 2e 20 49 66 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 20 61 | yer.joined..If.control.schemes.a |
| 30a0 | 72 65 20 70 72 65 73 65 6e 74 20 69 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 61 63 74 69 6f 6e 73 | re.present.in.<see.cref="actions |
| 30c0 | 22 2f 3e 2c 20 74 68 65 20 66 69 72 73 74 20 6f 6e 65 20 63 6f 6d 70 61 74 69 62 6c 65 0d 0a 20 | "/>,.the.first.one.compatible... |
| 30e0 | 20 20 20 2f 2f 2f 20 77 69 74 68 20 74 68 61 74 20 64 65 76 69 63 65 20 69 73 20 63 68 6f 73 65 | ...///.with.that.device.is.chose |
| 3100 | 6e 2e 20 49 66 20 61 64 64 69 74 69 6f 6e 61 6c 20 64 65 76 69 63 65 73 20 61 72 65 20 72 65 71 | n..If.additional.devices.are.req |
| 3120 | 75 69 72 65 64 2c 20 74 68 65 73 65 20 77 69 6c 6c 20 62 65 20 70 61 69 72 65 64 20 66 72 6f 6d | uired,.these.will.be.paired.from |
| 3140 | 20 74 68 65 20 70 6f 6f 6c 0d 0a 20 20 20 20 2f 2f 2f 20 6f 66 20 63 75 72 72 65 6e 74 6c 79 20 | .the.pool......///.of.currently. |
| 3160 | 75 6e 70 61 69 72 65 64 20 64 65 76 69 63 65 73 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 | unpaired.devices.......///...... |
| 3180 | 2f 2f 2f 20 44 65 76 69 63 65 20 70 61 69 72 69 6e 67 73 20 63 61 6e 20 62 65 20 63 68 61 6e 67 | ///.Device.pairings.can.be.chang |
| 31a0 | 65 64 20 61 74 20 61 6e 79 20 74 69 6d 65 20 62 79 20 65 69 74 68 65 72 20 6d 61 6e 75 61 6c 6c | ed.at.any.time.by.either.manuall |
| 31c0 | 79 20 63 6f 6e 74 72 6f 6c 6c 69 6e 67 20 70 61 69 72 69 6e 67 20 74 68 72 6f 75 67 68 0d 0a 20 | y.controlling.pairing.through... |
| 31e0 | 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 55 73 65 72 2e 50 65 72 66 | ...///.<see.cref="InputUser.Perf |
| 3200 | 6f 72 6d 50 61 69 72 69 6e 67 57 69 74 68 44 65 76 69 63 65 22 2f 3e 20 28 61 6e 64 20 72 65 6c | ormPairingWithDevice"/>.(and.rel |
| 3220 | 61 74 65 64 20 6d 65 74 68 6f 64 73 29 20 75 73 69 6e 67 20 61 20 50 6c 61 79 65 72 49 6e 70 75 | ated.methods).using.a.PlayerInpu |
| 3240 | 74 27 73 0d 0a 20 20 20 20 2f 2f 2f 20 61 73 73 69 67 6e 65 64 20 3c 73 65 65 20 63 72 65 66 3d | t's......///.assigned.<see.cref= |
| 3260 | 22 75 73 65 72 22 2f 3e 20 6f 72 20 62 79 20 73 77 69 74 63 68 69 6e 67 20 63 6f 6e 74 72 6f 6c | "user"/>.or.by.switching.control |
| 3280 | 20 73 63 68 65 6d 65 73 20 28 65 2e 67 2e 20 75 73 69 6e 67 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 | .schemes.(e.g..using......///.<s |
| 32a0 | 65 65 20 63 72 65 66 3d 22 53 77 69 74 63 68 43 75 72 72 65 6e 74 43 6f 6e 74 72 6f 6c 53 63 68 | ee.cref="SwitchCurrentControlSch |
| 32c0 | 65 6d 65 28 73 74 72 69 6e 67 2c 49 6e 70 75 74 44 65 76 69 63 65 5b 5d 29 22 2f 3e 29 2c 20 69 | eme(string,InputDevice[])"/>),.i |
| 32e0 | 66 20 61 6e 79 20 61 72 65 20 70 72 65 73 65 6e 74 20 69 6e 20 74 68 65 20 50 6c 61 79 65 72 49 | f.any.are.present.in.the.PlayerI |
| 3300 | 6e 70 75 74 27 73 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 61 63 74 69 6f | nput's......///.<see.cref="actio |
| 3320 | 6e 73 22 2f 3e 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 61 20 | ns"/>.......///......///.When.a. |
| 3340 | 70 6c 61 79 65 72 20 6c 6f 73 65 73 20 61 20 64 65 76 69 63 65 20 70 61 69 72 65 64 20 74 6f 20 | player.loses.a.device.paired.to. |
| 3360 | 69 74 20 28 65 2e 67 2e 20 77 68 65 6e 20 69 74 20 69 73 20 75 6e 70 6c 75 67 67 65 64 20 6f 72 | it.(e.g..when.it.is.unplugged.or |
| 3380 | 20 6c 6f 73 65 73 20 70 6f 77 65 72 29 2c 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 55 | .loses.power),.<see.cref="InputU |
| 33a0 | 73 65 72 22 2f 3e 0d 0a 20 20 20 20 2f 2f 2f 20 77 69 6c 6c 20 73 69 67 6e 61 6c 20 3c 73 65 65 | ser"/>......///.will.signal.<see |
| 33c0 | 20 63 72 65 66 3d 22 49 6e 70 75 74 55 73 65 72 43 68 61 6e 67 65 2e 44 65 76 69 63 65 4c 6f 73 | .cref="InputUserChange.DeviceLos |
| 33e0 | 74 22 2f 3e 20 77 68 69 63 68 20 69 73 20 61 6c 73 6f 20 73 75 72 66 61 63 65 64 20 61 73 20 61 | t"/>.which.is.also.surfaced.as.a |
| 3400 | 20 6d 65 73 73 61 67 65 2c 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 64 65 | .message,......///.<see.cref="de |
| 3420 | 76 69 63 65 4c 6f 73 74 45 76 65 6e 74 22 2f 3e 2c 20 6f 72 20 3c 73 65 65 20 63 72 65 66 3d 22 | viceLostEvent"/>,.or.<see.cref=" |
| 3440 | 6f 6e 44 65 76 69 63 65 4c 6f 73 74 22 2f 3e 20 28 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 3c 73 | onDeviceLost"/>.(depending.on.<s |
| 3460 | 65 65 20 63 72 65 66 3d 22 6e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 22 2f 3e | ee.cref="notificationBehavior"/> |
| 3480 | 29 2e 0d 0a 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 61 20 64 65 76 69 63 65 20 69 73 20 72 65 63 | ).......///.When.a.device.is.rec |
| 34a0 | 6f 6e 6e 65 63 74 65 64 2c 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 55 73 65 72 22 2f | onnected,.<see.cref="InputUser"/ |
| 34c0 | 3e 20 77 69 6c 6c 20 73 69 67 6e 61 6c 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 55 73 | >.will.signal.<see.cref="InputUs |
| 34e0 | 65 72 43 68 61 6e 67 65 2e 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 22 2f 3e 0d 0a 20 20 20 20 | erChange.DeviceRegained"/>...... |
| 3500 | 2f 2f 2f 20 77 68 69 63 68 20 61 6c 73 6f 20 69 73 20 73 75 72 66 61 63 65 64 20 61 73 20 61 20 | ///.which.also.is.surfaced.as.a. |
| 3520 | 6d 65 73 73 61 67 65 2c 20 61 73 20 3c 73 65 65 20 63 72 65 66 3d 22 64 65 76 69 63 65 52 65 67 | message,.as.<see.cref="deviceReg |
| 3540 | 61 69 6e 65 64 45 76 65 6e 74 22 2f 3e 2c 20 6f 72 20 3c 73 65 65 20 63 72 65 66 3d 22 6f 6e 44 | ainedEvent"/>,.or.<see.cref="onD |
| 3560 | 65 76 69 63 65 52 65 67 61 69 6e 65 64 22 2f 3e 0d 0a 20 20 20 20 2f 2f 2f 20 28 64 65 70 65 6e | eviceRegained"/>......///.(depen |
| 3580 | 64 69 6e 67 20 6f 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 6e 6f 74 69 66 69 63 61 74 69 6f 6e 42 | ding.on.<see.cref="notificationB |
| 35a0 | 65 68 61 76 69 6f 72 22 2f 3e 29 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 57 | ehavior"/>).......///......///.W |
| 35c0 | 68 65 6e 20 74 68 65 72 65 20 69 73 20 6f 6e 6c 79 20 61 20 73 69 6e 67 6c 65 20 61 63 74 69 76 | hen.there.is.only.a.single.activ |
| 35e0 | 65 20 50 6c 61 79 65 72 49 6e 70 75 74 20 69 6e 20 74 68 65 20 67 61 6d 65 2c 20 6a 6f 69 6e 69 | e.PlayerInput.in.the.game,.joini |
| 3600 | 6e 67 20 69 73 20 6e 6f 74 20 65 6e 61 62 6c 65 64 20 28 73 65 65 0d 0a 20 20 20 20 2f 2f 2f 20 | ng.is.not.enabled.(see......///. |
| 3620 | 3c 73 65 65 20 63 72 65 66 3d 22 50 6c 61 79 65 72 49 6e 70 75 74 4d 61 6e 61 67 65 72 2e 6a 6f | <see.cref="PlayerInputManager.jo |
| 3640 | 69 6e 69 6e 67 45 6e 61 62 6c 65 64 22 2f 3e 29 2c 20 61 6e 64 20 3c 73 65 65 20 63 72 65 66 3d | iningEnabled"/>),.and.<see.cref= |
| 3660 | 22 6e 65 76 65 72 41 75 74 6f 53 77 69 74 63 68 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 73 22 2f | "neverAutoSwitchControlSchemes"/ |
| 3680 | 3e 20 69 73 20 6e 6f 74 0d 0a 20 20 20 20 2f 2f 2f 20 73 65 74 20 74 6f 20 3c 63 3e 74 72 75 65 | >.is.not......///.set.to.<c>true |
| 36a0 | 3c 2f 63 3e 2c 20 64 65 76 69 63 65 20 70 61 69 72 69 6e 67 73 20 66 6f 72 20 74 68 65 20 70 6c | </c>,.device.pairings.for.the.pl |
| 36c0 | 61 79 65 72 20 77 69 6c 6c 20 61 6c 73 6f 20 75 70 64 61 74 65 20 61 75 74 6f 6d 61 74 69 63 61 | ayer.will.also.update.automatica |
| 36e0 | 6c 6c 79 20 62 61 73 65 64 20 6f 6e 20 64 65 76 69 63 65 20 75 73 61 67 65 2e 0d 0a 20 20 20 20 | lly.based.on.device.usage....... |
| 3700 | 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 49 66 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 20 | ///......///.If.control.schemes. |
| 3720 | 61 72 65 20 70 72 65 73 65 6e 74 20 69 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 61 63 74 69 6f 6e | are.present.in.<see.cref="action |
| 3740 | 73 22 2f 3e 2c 20 74 68 65 6e 20 69 66 20 61 20 64 65 76 69 63 65 20 69 73 20 75 73 65 64 20 28 | s"/>,.then.if.a.device.is.used.( |
| 3760 | 6e 6f 74 20 6d 65 72 65 6c 79 20 70 6c 75 67 67 65 64 20 69 6e 0d 0a 20 20 20 20 2f 2f 2f 20 62 | not.merely.plugged.in......///.b |
| 3780 | 75 74 20 72 61 74 68 65 72 20 72 65 63 65 69 76 65 73 20 69 6e 70 75 74 20 6f 6e 20 61 20 6e 6f | ut.rather.receives.input.on.a.no |
| 37a0 | 6e 2d 6e 6f 69 73 79 2c 20 6e 6f 6e 2d 73 79 6e 74 68 65 74 69 63 20 63 6f 6e 74 72 6f 6c 29 20 | n-noisy,.non-synthetic.control). |
| 37c0 | 77 68 69 63 68 20 69 73 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 61 20 63 6f 6e 74 72 | which.is.compatible.with.a.contr |
| 37e0 | 6f 6c 20 73 63 68 65 6d 65 0d 0a 20 20 20 20 2f 2f 2f 20 6f 74 68 65 72 20 74 68 61 6e 20 74 68 | ol.scheme......///.other.than.th |
| 3800 | 65 20 63 75 72 72 65 6e 74 6c 79 20 75 73 65 64 20 6f 6e 65 2c 20 50 6c 61 79 65 72 49 6e 70 75 | e.currently.used.one,.PlayerInpu |
| 3820 | 74 20 77 69 6c 6c 20 61 74 74 65 6d 70 74 20 74 6f 20 73 77 69 74 63 68 20 74 6f 20 74 68 61 74 | t.will.attempt.to.switch.to.that |
| 3840 | 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 2e 20 53 75 63 63 65 73 73 20 64 65 70 65 6e 64 73 | .control.scheme..Success.depends |
| 3860 | 0d 0a 20 20 20 20 2f 2f 2f 20 6f 6e 20 77 68 65 74 68 65 72 20 61 6c 6c 20 64 65 76 69 63 65 20 | ......///.on.whether.all.device. |
| 3880 | 72 65 71 75 69 72 65 6d 65 6e 74 73 20 66 6f 72 20 74 68 61 74 20 73 63 68 65 6d 65 20 61 72 65 | requirements.for.that.scheme.are |
| 38a0 | 20 6d 65 74 20 66 72 6f 6d 20 74 68 65 20 73 65 74 20 6f 66 20 61 76 61 69 6c 61 62 6c 65 20 64 | .met.from.the.set.of.available.d |
| 38c0 | 65 76 69 63 65 73 2e 20 49 66 20 61 20 63 6f 6e 74 72 6f 6c 0d 0a 20 20 20 20 2f 2f 2f 20 73 63 | evices..If.a.control......///.sc |
| 38e0 | 68 65 6d 65 20 68 61 70 70 65 6e 73 2c 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 55 73 | heme.happens,.<see.cref="InputUs |
| 3900 | 65 72 22 2f 3e 20 73 69 67 6e 61 6c 73 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 55 73 | er"/>.signals.<see.cref="InputUs |
| 3920 | 65 72 43 68 61 6e 67 65 2e 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 43 68 61 6e 67 65 64 22 2f 3e | erChange.ControlSchemeChanged"/> |
| 3940 | 20 6f 6e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 55 73 65 | .on......///.<see.cref="InputUse |
| 3960 | 72 2e 6f 6e 43 68 61 6e 67 65 22 2f 3e 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f | r.onChange"/>.......///....../// |
| 3980 | 20 49 66 20 6e 6f 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 20 61 72 65 20 70 72 65 73 65 | .If.no.control.schemes.are.prese |
| 39a0 | 6e 74 20 69 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 61 63 74 69 6f 6e 73 22 2f 3e 2c 20 50 6c 61 | nt.in.<see.cref="actions"/>,.Pla |
| 39c0 | 79 65 72 49 6e 70 75 74 20 77 69 6c 6c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 70 61 69 72 | yerInput.will.automatically.pair |
| 39e0 | 20 61 6e 79 20 6e 65 77 6c 79 0d 0a 20 20 20 20 2f 2f 2f 20 61 76 61 69 6c 61 62 6c 65 20 64 65 | .any.newly......///.available.de |
| 3a00 | 76 69 63 65 20 74 6f 20 69 74 73 65 6c 66 20 69 66 20 74 68 65 20 67 69 76 65 6e 20 64 65 76 69 | vice.to.itself.if.the.given.devi |
| 3a20 | 63 65 20 68 61 73 20 61 6e 79 20 62 69 6e 64 69 6e 67 73 20 61 76 61 69 6c 61 62 6c 65 20 66 6f | ce.has.any.bindings.available.fo |
| 3a40 | 72 20 69 74 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 42 6f 74 68 20 62 65 68 | r.it.......///......///.Both.beh |
| 3a60 | 61 76 69 6f 72 73 20 64 65 73 63 72 69 62 65 64 20 69 6e 20 74 68 65 20 70 72 65 76 69 6f 75 73 | aviors.described.in.the.previous |
| 3a80 | 20 74 77 6f 20 70 61 72 61 67 72 61 70 68 73 20 61 72 65 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c | .two.paragraphs.are.automaticall |
| 3aa0 | 79 20 64 69 73 61 62 6c 65 64 20 69 66 20 6d 6f 72 65 20 74 68 61 6e 20 6f 6e 65 0d 0a 20 20 20 | y.disabled.if.more.than.one..... |
| 3ac0 | 20 2f 2f 2f 20 50 6c 61 79 65 72 49 6e 70 75 74 20 69 73 20 61 63 74 69 76 65 2e 0d 0a 20 20 20 | .///.PlayerInput.is.active...... |
| 3ae0 | 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 | .///.</remarks>......///.<seeals |
| 3b00 | 6f 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 | o.cref="UnityEngine.InputSystem. |
| 3b20 | 50 6c 61 79 65 72 49 6e 70 75 74 4d 61 6e 61 67 65 72 22 2f 3e 0d 0a 20 20 20 20 5b 53 79 73 74 | PlayerInputManager"/>......[Syst |
| 3b40 | 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 75 70 70 | em.Diagnostics.CodeAnalysis.Supp |
| 3b60 | 72 65 73 73 4d 65 73 73 61 67 65 28 22 4d 69 63 72 6f 73 6f 66 74 2e 4e 61 6d 69 6e 67 22 2c 20 | ressMessage("Microsoft.Naming",. |
| 3b80 | 22 43 41 31 37 32 34 3a 54 79 70 65 4e 61 6d 65 73 53 68 6f 75 6c 64 4e 6f 74 4d 61 74 63 68 4e | "CA1724:TypeNamesShouldNotMatchN |
| 3ba0 | 61 6d 65 73 70 61 63 65 73 22 29 5d 0d 0a 20 20 20 20 5b 41 64 64 43 6f 6d 70 6f 6e 65 6e 74 4d | amespaces")]......[AddComponentM |
| 3bc0 | 65 6e 75 28 22 49 6e 70 75 74 2f 50 6c 61 79 65 72 20 49 6e 70 75 74 22 29 5d 0d 0a 20 20 20 20 | enu("Input/Player.Input")]...... |
| 3be0 | 5b 44 69 73 61 6c 6c 6f 77 4d 75 6c 74 69 70 6c 65 43 6f 6d 70 6f 6e 65 6e 74 5d 0d 0a 20 20 20 | [DisallowMultipleComponent]..... |
| 3c00 | 20 70 75 62 6c 69 63 20 63 6c 61 73 73 20 50 6c 61 79 65 72 49 6e 70 75 74 20 3a 20 4d 6f 6e 6f | .public.class.PlayerInput.:.Mono |
| 3c20 | 42 65 68 61 76 69 6f 75 72 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 | Behaviour......{..........///.<s |
| 3c40 | 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 61 6d 65 20 6f 66 20 74 68 65 | ummary>..........///.Name.of.the |
| 3c60 | 20 6d 65 73 73 61 67 65 20 74 68 61 74 20 69 73 20 73 65 6e 74 20 77 69 74 68 20 3c 63 3e 55 6e | .message.that.is.sent.with.<c>Un |
| 3c80 | 69 74 79 45 6e 67 69 6e 65 2e 4f 62 6a 65 63 74 2e 53 65 6e 64 4d 65 73 73 61 67 65 3c 2f 63 3e | ityEngine.Object.SendMessage</c> |
| 3ca0 | 20 77 68 65 6e 20 61 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 70 6c 61 79 65 72 20 6c 6f 73 65 | .when.a..........///.player.lose |
| 3cc0 | 73 20 61 20 64 65 76 69 63 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 | s.a.device...........///.</summa |
| 3ce0 | 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 | ry>..........///.<seealso.cref=" |
| 3d00 | 6f 6e 44 65 76 69 63 65 4c 6f 73 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 | onDeviceLost"/>..........public. |
| 3d20 | 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 44 65 76 69 63 65 4c 6f 73 74 4d 65 73 73 61 67 65 20 3d | const.string.DeviceLostMessage.= |
| 3d40 | 20 22 4f 6e 44 65 76 69 63 65 4c 6f 73 74 22 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 | ."OnDeviceLost";............///. |
| 3d60 | 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 61 6d 65 20 6f 66 20 74 | <summary>..........///.Name.of.t |
| 3d80 | 68 65 20 6d 65 73 73 61 67 65 20 74 68 61 74 20 69 73 20 73 65 6e 74 20 77 69 74 68 20 3c 63 3e | he.message.that.is.sent.with.<c> |
| 3da0 | 55 6e 69 74 79 45 6e 67 69 6e 65 2e 4f 62 6a 65 63 74 2e 53 65 6e 64 4d 65 73 73 61 67 65 3c 2f | UnityEngine.Object.SendMessage</ |
| 3dc0 | 63 3e 20 77 68 65 6e 20 61 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 70 6c 61 79 65 72 20 72 65 | c>.when.a..........///.player.re |
| 3de0 | 67 61 69 6e 73 20 61 20 64 65 76 69 63 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 | gains.a.device...........///.</s |
| 3e00 | 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 | ummary>..........///.<seealso.cr |
| 3e20 | 65 66 3d 22 6f 6e 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 22 2f 3e 0d 0a 20 20 20 20 20 20 20 | ef="onDeviceRegained"/>......... |
| 3e40 | 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 44 65 76 69 63 65 52 65 67 61 69 | .public.const.string.DeviceRegai |
| 3e60 | 6e 65 64 4d 65 73 73 61 67 65 20 3d 20 22 4f 6e 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 22 3b | nedMessage.=."OnDeviceRegained"; |
| 3e80 | 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>....... |
| 3ea0 | 20 20 20 2f 2f 2f 20 4e 61 6d 65 20 6f 66 20 74 68 65 20 6d 65 73 73 61 67 65 20 74 68 61 74 20 | ...///.Name.of.the.message.that. |
| 3ec0 | 69 73 20 73 65 6e 74 20 77 69 74 68 20 3c 63 3e 55 6e 69 74 79 45 6e 67 69 6e 65 2e 4f 62 6a 65 | is.sent.with.<c>UnityEngine.Obje |
| 3ee0 | 63 74 2e 53 65 6e 64 4d 65 73 73 61 67 65 3c 2f 63 3e 20 77 68 65 6e 20 74 68 65 0d 0a 20 20 20 | ct.SendMessage</c>.when.the..... |
| 3f00 | 20 20 20 20 20 2f 2f 2f 20 63 6f 6e 74 72 6f 6c 73 20 75 73 65 64 20 62 79 20 61 20 70 6c 61 79 | .....///.controls.used.by.a.play |
| 3f20 | 65 72 20 61 72 65 20 63 68 61 6e 67 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 | er.are.changed...........///.</s |
| 3f40 | 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 | ummary>..........///.<seealso.cr |
| 3f60 | 65 66 3d 22 6f 6e 43 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 65 64 22 2f 3e 0d 0a 20 20 20 20 20 20 | ef="onControlsChanged"/>........ |
| 3f80 | 20 20 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 43 6f 6e 74 72 6f 6c 73 43 68 | ..public.const.string.ControlsCh |
| 3fa0 | 61 6e 67 65 64 4d 65 73 73 61 67 65 20 3d 20 22 4f 6e 43 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 65 | angedMessage.=."OnControlsChange |
| 3fc0 | 64 22 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 20 | d";............///.<summary>.... |
| 3fe0 | 20 20 20 20 20 20 2f 2f 2f 20 57 68 65 74 68 65 72 20 69 6e 70 75 74 20 69 73 20 6f 6e 20 74 68 | ......///.Whether.input.is.on.th |
| 4000 | 65 20 70 6c 61 79 65 72 20 69 73 20 61 63 74 69 76 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f | e.player.is.active.........../// |
| 4020 | 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e | .</summary>..........///.<value> |
| 4040 | 49 66 20 74 72 75 65 2c 20 74 68 65 20 70 6c 61 79 65 72 20 69 73 20 72 65 63 65 69 76 69 6e 67 | If.true,.the.player.is.receiving |
| 4060 | 20 69 6e 70 75 74 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 | .input.</value>..........///.<se |
| 4080 | 65 61 6c 73 6f 20 63 72 65 66 3d 22 41 63 74 69 76 61 74 65 49 6e 70 75 74 22 2f 3e 0d 0a 20 20 | ealso.cref="ActivateInput"/>.... |
| 40a0 | 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 44 65 61 63 74 69 76 | ......///.<seealso.cref="Deactiv |
| 40c0 | 61 74 65 49 6e 70 75 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c | ateInput"/>..........public.bool |
| 40e0 | 20 69 6e 70 75 74 49 73 41 63 74 69 76 65 20 3d 3e 20 6d 5f 49 6e 70 75 74 41 63 74 69 76 65 3b | .inputIsActive.=>.m_InputActive; |
| 4100 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5b 4f 62 73 6f 6c 65 74 65 28 22 55 73 65 20 69 6e 70 75 74 | ............[Obsolete("Use.input |
| 4120 | 49 73 41 63 74 69 76 65 20 69 6e 73 74 65 61 64 2e 22 29 5d 0d 0a 20 20 20 20 20 20 20 20 70 75 | IsActive.instead.")]..........pu |
| 4140 | 62 6c 69 63 20 62 6f 6f 6c 20 61 63 74 69 76 65 20 3d 3e 20 69 6e 70 75 74 49 73 41 63 74 69 76 | blic.bool.active.=>.inputIsActiv |
| 4160 | 65 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 20 20 | e;............///.<summary>..... |
| 4180 | 20 20 20 20 20 2f 2f 2f 20 55 6e 69 71 75 65 2c 20 7a 65 72 6f 2d 62 61 73 65 64 20 69 6e 64 65 | .....///.Unique,.zero-based.inde |
| 41a0 | 78 20 6f 66 20 74 68 65 20 70 6c 61 79 65 72 2e 20 46 6f 72 20 65 78 61 6d 70 6c 65 2c 20 3c 63 | x.of.the.player..For.example,.<c |
| 41c0 | 3e 32 3c 2f 63 3e 20 66 6f 72 20 74 68 65 20 74 68 69 72 64 20 70 6c 61 79 65 72 2e 0d 0a 20 20 | >2</c>.for.the.third.player..... |
| 41e0 | 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>..........// |
| 4200 | 2f 20 3c 76 61 6c 75 65 3e 55 6e 69 71 75 65 20 69 6e 64 65 78 20 6f 66 20 74 68 65 20 70 6c 61 | /.<value>Unique.index.of.the.pla |
| 4220 | 79 65 72 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 | yer.</value>..........///.<remar |
| 4240 | 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4f 6e 63 65 20 61 73 73 69 67 6e 65 64 2c 20 | ks>..........///.Once.assigned,. |
| 4260 | 61 20 70 6c 61 79 65 72 20 69 6e 64 65 78 20 77 69 6c 6c 20 6e 6f 74 20 63 68 61 6e 67 65 2e 0d | a.player.index.will.not.change.. |
| 4280 | 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 74 | .........///..........///.Note.t |
| 42a0 | 68 61 74 20 74 68 65 20 70 6c 61 79 65 72 20 69 6e 64 65 78 20 64 6f 65 73 20 6e 6f 74 20 6e 65 | hat.the.player.index.does.not.ne |
| 42c0 | 63 65 73 73 61 72 69 6c 79 20 63 6f 72 72 65 73 70 6f 6e 64 20 74 6f 20 74 68 65 20 70 6c 61 79 | cessarily.correspond.to.the.play |
| 42e0 | 65 72 27 73 20 69 6e 64 65 78 20 69 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 61 6c 6c 22 2f 3e 2e | er's.index.in.<see.cref="all"/>. |
| 4300 | 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 61 72 72 61 79 20 77 69 6c 6c 20 61 6c 77 | ..........///.The.array.will.alw |
| 4320 | 61 79 73 20 63 6f 6e 74 61 69 6e 20 61 6c 6c 20 63 75 72 72 65 6e 74 6c 79 20 65 6e 61 62 6c 65 | ays.contain.all.currently.enable |
| 4340 | 64 20 70 6c 61 79 65 72 73 20 73 6f 20 77 68 65 6e 20 61 20 70 6c 61 79 65 72 20 69 73 20 64 69 | d.players.so.when.a.player.is.di |
| 4360 | 73 61 62 6c 65 64 20 6f 72 20 64 65 73 74 72 6f 79 65 64 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f | sabled.or.destroyed,..........// |
| 4380 | 2f 20 69 74 20 77 69 6c 6c 20 62 65 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d 20 74 68 65 20 61 72 | /.it.will.be.removed.from.the.ar |
| 43a0 | 72 61 79 2e 20 48 6f 77 65 76 65 72 2c 20 74 68 65 20 70 6c 61 79 65 72 20 69 6e 64 65 78 20 6f | ray..However,.the.player.index.o |
| 43c0 | 66 20 74 68 65 20 72 65 6d 61 69 6e 69 6e 67 20 70 6c 61 79 65 72 73 20 77 69 6c 6c 20 6e 6f 74 | f.the.remaining.players.will.not |
| 43e0 | 20 63 68 61 6e 67 65 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 | .change...........///.</remarks> |
| 4400 | 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 69 6e 74 20 70 6c 61 79 65 72 49 6e 64 65 78 | ..........public.int.playerIndex |
| 4420 | 20 3d 3e 20 6d 5f 50 6c 61 79 65 72 49 6e 64 65 78 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f | .=>.m_PlayerIndex;............// |
| 4440 | 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 49 66 20 73 70 6c 69 | /.<summary>..........///.If.spli |
| 4460 | 74 2d 73 63 72 65 65 6e 20 69 73 20 65 6e 61 62 6c 65 64 20 28 3c 73 65 65 20 63 72 65 66 3d 22 | t-screen.is.enabled.(<see.cref=" |
| 4480 | 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 50 6c 61 79 65 72 49 6e | UnityEngine.InputSystem.PlayerIn |
| 44a0 | 70 75 74 4d 61 6e 61 67 65 72 2e 73 70 6c 69 74 53 63 72 65 65 6e 22 2f 3e 29 2c 0d 0a 20 20 20 | putManager.splitScreen"/>),..... |
| 44c0 | 20 20 20 20 20 2f 2f 2f 20 74 68 69 73 20 69 73 20 74 68 65 20 69 6e 64 65 78 20 6f 66 20 74 68 | .....///.this.is.the.index.of.th |
| 44e0 | 65 20 73 63 72 65 65 6e 20 61 72 65 61 20 75 73 65 64 20 62 79 20 74 68 65 20 70 6c 61 79 65 72 | e.screen.area.used.by.the.player |
| 4500 | 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 20 20 20 20 | ...........///.</summary>....... |
| 4520 | 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 49 6e 64 65 78 20 6f 66 20 73 70 6c 69 74 2d 73 63 72 | ...///.<value>Index.of.split-scr |
| 4540 | 65 65 6e 20 61 72 65 61 20 61 73 73 69 67 6e 65 64 20 74 6f 20 70 6c 61 79 65 72 20 6f 72 20 2d | een.area.assigned.to.player.or.- |
| 4560 | 31 20 69 66 20 74 68 65 20 70 6c 61 79 65 72 20 69 73 20 6e 6f 74 0d 0a 20 20 20 20 20 20 20 20 | 1.if.the.player.is.not.......... |
| 4580 | 2f 2f 2f 20 75 73 69 6e 67 20 73 70 6c 69 74 2d 73 63 72 65 65 6e 2e 3c 2f 76 61 6c 75 65 3e 0d | ///.using.split-screen.</value>. |
| 45a0 | 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 20 | .........///.<remarks>.......... |
| 45c0 | 2f 2f 2f 20 53 70 6c 69 74 20 73 63 72 65 65 6e 20 61 72 65 61 73 20 61 72 65 20 65 6e 75 6d 65 | ///.Split.screen.areas.are.enume |
| 45e0 | 72 61 74 65 64 20 72 6f 77 20 62 79 20 72 6f 77 20 61 6e 64 20 77 69 74 68 69 6e 20 72 6f 77 73 | rated.row.by.row.and.within.rows |
| 4600 | 2c 20 63 6f 6c 75 6d 6e 20 62 79 20 63 6f 6c 75 6d 6e 2e 20 53 6f 2c 20 69 66 2c 20 66 6f 72 20 | ,.column.by.column..So,.if,.for. |
| 4620 | 65 78 61 6d 70 6c 65 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 65 72 65 20 61 72 65 20 | example,..........///.there.are. |
| 4640 | 66 6f 75 72 20 73 65 70 61 72 61 74 65 20 73 70 6c 69 74 2d 73 63 72 65 65 6e 20 61 72 65 61 73 | four.separate.split-screen.areas |
| 4660 | 2c 20 74 68 65 20 75 70 70 65 72 20 6c 65 66 74 20 6f 6e 65 20 69 73 20 23 30 2c 20 74 68 65 20 | ,.the.upper.left.one.is.#0,.the. |
| 4680 | 75 70 70 65 72 20 72 69 67 68 74 20 6f 6e 65 20 69 73 20 23 31 2c 0d 0a 20 20 20 20 20 20 20 20 | upper.right.one.is.#1,.......... |
| 46a0 | 2f 2f 2f 20 74 68 65 20 6c 6f 77 65 72 20 6c 65 66 74 20 6f 6e 65 20 69 73 20 23 32 2c 20 61 6e | ///.the.lower.left.one.is.#2,.an |
| 46c0 | 64 20 74 68 65 20 6c 6f 77 65 72 20 72 69 67 68 74 20 6f 6e 65 20 69 73 20 23 33 2e 0d 0a 20 20 | d.the.lower.right.one.is.#3..... |
| 46e0 | 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 70 6c 69 74 20 73 63 72 | ......///..........///.Split.scr |
| 4700 | 65 65 6e 20 61 72 65 61 73 20 61 72 65 20 75 73 75 61 6c 6c 79 20 61 73 73 69 67 6e 65 64 20 61 | een.areas.are.usually.assigned.a |
| 4720 | 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 62 75 74 20 70 6c 61 79 65 72 73 20 63 61 6e 20 61 6c 73 | utomatically.but.players.can.als |
| 4740 | 6f 20 62 65 20 61 73 73 69 67 6e 65 64 20 74 6f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 72 | o.be.assigned.to..........///.ar |
| 4760 | 65 61 73 20 65 78 70 6c 69 63 69 74 6c 79 20 74 68 72 6f 75 67 68 20 3c 73 65 65 20 63 72 65 66 | eas.explicitly.through.<see.cref |
| 4780 | 3d 22 49 6e 73 74 61 6e 74 69 61 74 65 28 47 61 6d 65 4f 62 6a 65 63 74 2c 69 6e 74 2c 73 74 72 | ="Instantiate(GameObject,int,str |
| 47a0 | 69 6e 67 2c 69 6e 74 2c 49 6e 70 75 74 44 65 76 69 63 65 29 22 2f 3e 20 6f 72 0d 0a 20 20 20 20 | ing,int,InputDevice)"/>.or...... |
| 47c0 | 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c 61 79 65 72 49 6e 70 75 74 4d 61 | ....///.<see.cref="PlayerInputMa |
| 47e0 | 6e 61 67 65 72 2e 4a 6f 69 6e 50 6c 61 79 65 72 28 69 6e 74 2c 69 6e 74 2c 73 74 72 69 6e 67 2c | nager.JoinPlayer(int,int,string, |
| 4800 | 49 6e 70 75 74 44 65 76 69 63 65 29 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f | InputDevice)"/>...........///.</ |
| 4820 | 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 |
| 4840 | 72 65 66 3d 22 63 61 6d 65 72 61 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 | ref="camera"/>..........///.<see |
| 4860 | 61 6c 73 6f 20 63 72 65 66 3d 22 50 6c 61 79 65 72 49 6e 70 75 74 4d 61 6e 61 67 65 72 2e 73 70 | also.cref="PlayerInputManager.sp |
| 4880 | 6c 69 74 53 63 72 65 65 6e 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 69 6e 74 | litScreen"/>..........public.int |
| 48a0 | 20 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 20 3d 3e 20 6d 5f 53 70 6c 69 74 53 63 72 65 | .splitScreenIndex.=>.m_SplitScre |
| 48c0 | 65 6e 49 6e 64 65 78 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 | enIndex;............///.<summary |
| 48e0 | 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 6e 70 75 74 20 61 63 74 69 6f 6e 73 20 61 73 73 | >..........///.Input.actions.ass |
| 4900 | 6f 63 69 61 74 65 64 20 77 69 74 68 20 74 68 65 20 70 6c 61 79 65 72 2e 0d 0a 20 20 20 20 20 20 | ociated.with.the.player......... |
| 4920 | 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 |
| 4940 | 61 6c 75 65 3e 41 73 73 65 74 20 68 6f 6c 64 69 6e 67 20 74 68 65 20 70 6c 61 79 65 72 27 73 20 | alue>Asset.holding.the.player's. |
| 4960 | 69 6e 70 75 74 20 61 63 74 69 6f 6e 73 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 | input.actions.</value>.......... |
| 4980 | 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 | ///.<remarks>..........///.Note. |
| 49a0 | 74 68 61 74 20 65 76 65 72 79 20 70 6c 61 79 65 72 20 77 69 6c 6c 20 6d 61 69 6e 74 61 69 6e 20 | that.every.player.will.maintain. |
| 49c0 | 61 20 75 6e 69 71 75 65 20 63 6f 70 79 20 6f 66 20 74 68 65 20 67 69 76 65 6e 20 61 63 74 69 6f | a.unique.copy.of.the.given.actio |
| 49e0 | 6e 73 20 73 75 63 68 20 74 68 61 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 65 61 63 68 20 70 | ns.such.that..........///.each.p |
| 4a00 | 6c 61 79 65 72 20 72 65 63 65 69 76 65 73 20 61 6e 20 69 64 65 6e 74 69 63 61 6c 20 63 6f 70 79 | layer.receives.an.identical.copy |
| 4a20 | 2e 20 57 68 65 6e 20 61 73 73 69 67 6e 69 6e 67 20 74 68 65 20 73 61 6d 65 20 61 63 74 69 6f 6e | ..When.assigning.the.same.action |
| 4a40 | 73 20 74 6f 20 6d 75 6c 74 69 70 6c 65 20 70 6c 61 79 65 72 73 2c 0d 0a 20 20 20 20 20 20 20 20 | s.to.multiple.players,.......... |
| 4a60 | 2f 2f 2f 20 74 68 65 20 66 69 72 73 74 20 70 6c 61 79 65 72 20 77 69 6c 6c 20 75 73 65 20 74 68 | ///.the.first.player.will.use.th |
| 4a80 | 65 20 67 69 76 65 6e 20 61 63 74 69 6f 6e 73 20 61 73 20 69 73 20 62 75 74 20 61 6e 79 20 73 75 | e.given.actions.as.is.but.any.su |
| 4aa0 | 62 73 65 71 75 65 6e 74 20 70 6c 61 79 65 72 20 77 69 6c 6c 20 6d 61 6b 65 20 61 20 63 6f 70 79 | bsequent.player.will.make.a.copy |
| 4ac0 | 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f 66 20 74 68 65 20 61 63 74 69 6f 6e 73 20 75 73 69 | ..........///.of.the.actions.usi |
| 4ae0 | 6e 67 20 3c 73 65 65 20 63 72 65 66 3d 22 4f 62 6a 65 63 74 2e 49 6e 73 74 61 6e 74 69 61 74 65 | ng.<see.cref="Object.Instantiate |
| 4b00 | 28 4f 62 6a 65 63 74 29 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 | (Object)"/>...........///....... |
| 4b20 | 20 20 20 2f 2f 2f 20 54 68 65 20 61 73 73 65 74 20 6d 61 79 20 63 6f 6e 74 61 69 6e 20 61 6e 20 | ...///.The.asset.may.contain.an. |
| 4b40 | 61 72 62 69 74 72 61 72 79 20 6e 75 6d 62 65 72 20 6f 66 20 61 63 74 69 6f 6e 20 6d 61 70 73 2e | arbitrary.number.of.action.maps. |
| 4b60 | 20 42 79 20 73 65 74 74 69 6e 67 20 3c 73 65 65 20 63 72 65 66 3d 22 64 65 66 61 75 6c 74 41 63 | .By.setting.<see.cref="defaultAc |
| 4b80 | 74 69 6f 6e 4d 61 70 22 2f 3e 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f 6e 65 20 6f 66 20 | tionMap"/>,..........///.one.of. |
| 4ba0 | 74 68 65 6d 20 63 61 6e 20 62 65 20 73 65 6c 65 63 74 65 64 20 74 6f 20 65 6e 61 62 6c 65 64 20 | them.can.be.selected.to.enabled. |
| 4bc0 | 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 77 68 65 6e 20 50 6c 61 79 65 72 49 6e 70 75 74 20 69 | automatically.when.PlayerInput.i |
| 4be0 | 73 20 65 6e 61 62 6c 65 64 2e 20 49 66 20 6e 6f 20 64 65 66 61 75 6c 74 0d 0a 20 20 20 20 20 20 | s.enabled..If.no.default........ |
| 4c00 | 20 20 2f 2f 2f 20 61 63 74 69 6f 6e 20 6d 61 70 20 69 73 20 73 65 6c 65 63 74 65 64 2c 20 6e 6f | ..///.action.map.is.selected,.no |
| 4c20 | 6e 65 20 6f 66 20 74 68 65 20 61 63 74 69 6f 6e 20 6d 61 70 73 20 77 69 6c 6c 20 62 65 20 65 6e | ne.of.the.action.maps.will.be.en |
| 4c40 | 61 62 6c 65 64 20 62 79 20 50 6c 61 79 65 72 49 6e 70 75 74 20 69 74 73 65 6c 66 2e 20 55 73 65 | abled.by.PlayerInput.itself..Use |
| 4c60 | 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 53 77 69 74 63 68 43 | ..........///.<see.cref="SwitchC |
| 4c80 | 75 72 72 65 6e 74 41 63 74 69 6f 6e 4d 61 70 22 2f 3e 20 6f 72 20 6a 75 73 74 20 63 61 6c 6c 20 | urrentActionMap"/>.or.just.call. |
| 4ca0 | 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 4d 61 70 2e 45 6e 61 62 6c 65 | <see.cref="InputActionMap.Enable |
| 4cc0 | 22 2f 3e 20 64 69 72 65 63 74 6c 79 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 6f 20 65 6e 61 | "/>.directly..........///.to.ena |
| 4ce0 | 62 6c 65 20 61 20 73 70 65 63 69 66 69 63 20 6d 61 70 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f | ble.a.specific.map.........../// |
| 4d00 | 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 20 77 69 6c 6c | ..........///.Notifications.will |
| 4d20 | 20 62 65 20 73 65 6e 74 20 66 6f 72 20 61 6c 6c 20 61 63 74 69 6f 6e 73 20 69 6e 20 74 68 65 20 | .be.sent.for.all.actions.in.the. |
| 4d40 | 61 73 73 65 74 2c 20 6e 6f 74 20 6a 75 73 74 20 66 6f 72 20 74 68 6f 73 65 20 69 6e 20 74 68 65 | asset,.not.just.for.those.in.the |
| 4d60 | 20 66 69 72 73 74 20 61 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6d 61 70 2e 20 | .first.action..........///.map.. |
| 4d80 | 54 68 69 73 20 6d 65 61 6e 73 20 74 68 61 74 20 69 66 20 61 64 64 69 74 69 6f 6e 61 6c 20 6d 61 | This.means.that.if.additional.ma |
| 4da0 | 70 73 20 61 72 65 20 6d 61 6e 75 61 6c 6c 79 20 65 6e 61 62 6c 65 64 20 61 6e 64 20 64 69 73 61 | ps.are.manually.enabled.and.disa |
| 4dc0 | 62 6c 65 64 2c 20 6e 6f 74 69 66 69 63 61 74 69 6f 6e 73 20 77 69 6c 6c 0d 0a 20 20 20 20 20 20 | bled,.notifications.will........ |
| 4de0 | 20 20 2f 2f 2f 20 62 65 20 73 65 6e 74 20 66 6f 72 20 74 68 65 69 72 20 61 63 74 69 6f 6e 73 20 | ..///.be.sent.for.their.actions. |
| 4e00 | 61 73 20 74 68 65 79 20 72 65 63 65 69 76 65 20 69 6e 70 75 74 2e 0d 0a 20 20 20 20 20 20 20 20 | as.they.receive.input........... |
| 4e20 | 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 |
| 4e40 | 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 55 73 65 72 2e 61 63 74 69 6f 6e 73 22 2f 3e 0d | also.cref="InputUser.actions"/>. |
| 4e60 | 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 53 77 69 74 | .........///.<seealso.cref="Swit |
| 4e80 | 63 68 43 75 72 72 65 6e 74 41 63 74 69 6f 6e 4d 61 70 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 | chCurrentActionMap"/>..........p |
| 4ea0 | 75 62 6c 69 63 20 49 6e 70 75 74 41 63 74 69 6f 6e 41 73 73 65 74 20 61 63 74 69 6f 6e 73 0d 0a | ublic.InputActionAsset.actions.. |
| 4ec0 | 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 0d 0a 20 20 20 20 | ........{..............get...... |
| 4ee0 | 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 | ........{..................if.(! |
| 4f00 | 6d 5f 41 63 74 69 6f 6e 73 49 6e 69 74 69 61 6c 69 7a 65 64 20 26 26 20 67 61 6d 65 4f 62 6a 65 | m_ActionsInitialized.&&.gameObje |
| 4f20 | 63 74 2e 61 63 74 69 76 65 53 65 6c 66 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ct.activeSelf).................. |
| 4f40 | 20 20 20 20 49 6e 69 74 69 61 6c 69 7a 65 41 63 74 69 6f 6e 73 28 29 3b 0d 0a 20 20 20 20 20 20 | ....InitializeActions();........ |
| 4f60 | 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 41 63 74 69 6f 6e 73 3b 0d 0a 20 20 20 | ..........return.m_Actions;..... |
| 4f80 | 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 0d 0a 20 20 20 | .........}..............set..... |
| 4fa0 | 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 | .........{..................if.( |
| 4fc0 | 6d 5f 41 63 74 69 6f 6e 73 20 3d 3d 20 76 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | m_Actions.==.value)............. |
| 4fe0 | 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 20 20 20 20 20 | .........return;................ |
| 5000 | 20 20 20 20 2f 2f 20 4d 61 6b 65 20 73 75 72 65 20 74 68 61 74 20 69 66 20 77 65 20 61 6c 72 65 | ....//.Make.sure.that.if.we.alre |
| 5020 | 61 64 79 20 68 61 76 65 20 61 63 74 69 6f 6e 73 2c 20 74 68 65 79 20 67 65 74 20 64 69 73 61 62 | ady.have.actions,.they.get.disab |
| 5040 | 6c 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 63 74 69 | led...................if.(m_Acti |
| 5060 | 6f 6e 73 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d | ons.!=.null)..................{. |
| 5080 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 63 74 69 6f 6e 73 2e 44 | .....................m_Actions.D |
| 50a0 | 69 73 61 62 6c 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 | isable();......................i |
| 50c0 | 66 20 28 6d 5f 45 6e 61 62 6c 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | f.(m_Enabled)................... |
| 50e0 | 20 20 20 20 20 20 20 55 6e 69 6e 69 74 69 61 6c 69 7a 65 41 63 74 69 6f 6e 73 28 29 3b 0d 0a 20 | .......UninitializeActions();... |
| 5100 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ...............}................ |
| 5120 | 20 20 20 20 6d 5f 41 63 74 69 6f 6e 73 20 3d 20 76 61 6c 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 | ....m_Actions.=.value;.......... |
| 5140 | 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 45 6e 61 62 6c 65 64 29 0d 0a 20 20 20 20 20 20 | ..........if.(m_Enabled)........ |
| 5160 | 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..........{..................... |
| 5180 | 20 43 6c 65 61 72 43 61 63 68 65 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .ClearCaches();................. |
| 51a0 | 20 20 20 20 20 41 73 73 69 67 6e 55 73 65 72 41 6e 64 44 65 76 69 63 65 73 28 29 3b 0d 0a 20 20 | .....AssignUserAndDevices();.... |
| 51c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 69 74 69 61 6c 69 7a 65 41 63 74 69 | ..................InitializeActi |
| 51e0 | 6f 6e 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 | ons();......................if.( |
| 5200 | 6d 5f 49 6e 70 75 74 41 63 74 69 76 65 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | m_InputActive).................. |
| 5220 | 20 20 20 20 20 20 20 20 41 63 74 69 76 61 74 65 49 6e 70 75 74 28 29 3b 0d 0a 20 20 20 20 20 20 | ........ActivateInput();........ |
| 5240 | 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 7d 0d 0a 20 20 20 20 | ..........}..............}...... |
| 5260 | 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a | ....}............///.<summary>.. |
| 5280 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 61 6d 65 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e 74 6c | ........///.Name.of.the.currentl |
| 52a0 | 79 20 61 63 74 69 76 65 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 2e 0d 0a 20 20 20 20 20 20 | y.active.control.scheme......... |
| 52c0 | 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 |
| 52e0 | 61 6c 75 65 3e 4e 61 6d 65 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e 74 6c 79 20 61 63 74 69 76 | alue>Name.of.the.currently.activ |
| 5300 | 65 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 6f 72 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e | e.control.scheme.or.<c>null</c>. |
| 5320 | 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 73 3e 0d | </value>..........///.<remarks>. |
| 5340 | 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 74 68 61 74 20 74 68 69 73 20 70 72 6f 70 | .........///.Note.that.this.prop |
| 5360 | 65 72 74 79 20 77 69 6c 6c 20 62 65 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 20 69 66 20 74 68 65 72 | erty.will.be.<c>null</c>.if.ther |
| 5380 | 65 20 61 72 65 20 6e 6f 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 0d 0a 20 20 20 20 20 20 | e.are.no.control.schemes........ |
| 53a0 | 20 20 2f 2f 2f 20 64 65 66 69 6e 65 64 20 69 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 61 63 74 69 | ..///.defined.in.<see.cref="acti |
| 53c0 | 6f 6e 73 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 3e 0d | ons"/>...........///.</remarks>. |
| 53e0 | 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 53 77 69 74 | .........///.<seealso.cref="Swit |
| 5400 | 63 68 43 75 72 72 65 6e 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 28 55 6e 69 74 79 45 6e 67 69 | chCurrentControlScheme(UnityEngi |
| 5420 | 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 49 6e 70 75 74 44 65 76 69 63 65 5b 5d 29 22 2f 3e | ne.InputSystem.InputDevice[])"/> |
| 5440 | 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 64 65 66 | ..........///.<seealso.cref="def |
| 5460 | 61 75 6c 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 | aultControlScheme"/>..........pu |
| 5480 | 62 6c 69 63 20 73 74 72 69 6e 67 20 63 75 72 72 65 6e 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 | blic.string.currentControlScheme |
| 54a0 | 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 67 65 74 0d 0a 20 20 | ..........{..............get.... |
| 54c0 | 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 20 | ..........{..................if. |
| 54e0 | 28 21 6d 5f 49 6e 70 75 74 55 73 65 72 2e 76 61 6c 69 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | (!m_InputUser.valid)............ |
| 5500 | 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 | ..........return.null;.......... |
| 5520 | 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 63 68 65 6d 65 20 3d 20 6d 5f 49 6e 70 75 74 55 73 | ..........var.scheme.=.m_InputUs |
| 5540 | 65 72 2e 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | er.controlScheme;............... |
| 5560 | 20 20 20 72 65 74 75 72 6e 20 73 63 68 65 6d 65 3f 2e 6e 61 6d 65 3b 0d 0a 20 20 20 20 20 20 20 | ...return.scheme?.name;......... |
| 5580 | 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 2f 2f 2f | .....}..........}............/// |
| 55a0 | 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 64 65 66 61 | .<summary>..........///.The.defa |
| 55c0 | 75 6c 74 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 74 6f 20 74 72 79 2e 0d 0a 20 20 20 20 | ult.control.scheme.to.try....... |
| 55e0 | 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 2f 20 | ....///.</summary>..........///. |
| 5600 | 3c 76 61 6c 75 65 3e 4e 61 6d 65 20 6f 66 20 74 68 65 20 64 65 66 61 75 6c 74 20 63 6f 6e 74 72 | <value>Name.of.the.default.contr |
| 5620 | 6f 6c 20 73 63 68 65 6d 65 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 | ol.scheme.</value>..........///. |
| 5640 | 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 57 68 65 6e 20 50 6c 61 79 | <remarks>..........///.When.Play |
| 5660 | 65 72 49 6e 70 75 74 20 69 73 20 65 6e 61 62 6c 65 64 20 61 6e 64 20 74 68 69 73 20 69 73 20 6e | erInput.is.enabled.and.this.is.n |
| 5680 | 6f 74 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 20 61 6e 64 20 6e 6f 74 20 65 6d 70 74 79 2c 20 74 68 | ot.<c>null</c>.and.not.empty,.th |
| 56a0 | 65 20 50 6c 61 79 65 72 49 6e 70 75 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 77 69 6c 6c 20 | e.PlayerInput..........///.will. |
| 56c0 | 6c 6f 6f 6b 20 75 70 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 69 6e 20 3c 73 | look.up.the.control.scheme.in.<s |
| 56e0 | 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 41 73 73 65 74 2e 63 6f 6e 74 72 6f | ee.cref="InputActionAsset.contro |
| 5700 | 6c 53 63 68 65 6d 65 73 22 2f 3e 20 6f 66 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 | lSchemes"/>.of..........///.<see |
| 5720 | 20 63 72 65 66 3d 22 61 63 74 69 6f 6e 73 22 2f 3e 2e 20 49 66 20 66 6f 75 6e 64 2c 20 50 6c 61 | .cref="actions"/>..If.found,.Pla |
| 5740 | 79 65 72 49 6e 70 75 74 20 77 69 6c 6c 20 74 72 79 20 74 6f 20 61 63 74 69 76 61 74 65 20 74 68 | yerInput.will.try.to.activate.th |
| 5760 | 65 20 73 63 68 65 6d 65 2e 20 54 68 69 73 20 77 69 6c 6c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f | e.scheme..This.will........../// |
| 5780 | 20 73 75 63 63 65 65 64 20 6f 6e 6c 79 20 69 66 20 61 6c 6c 20 64 65 76 69 63 65 73 20 72 65 71 | .succeed.only.if.all.devices.req |
| 57a0 | 75 69 72 65 64 20 62 79 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 61 72 65 20 | uired.by.the.control.scheme.are. |
| 57c0 | 65 69 74 68 65 72 20 61 6c 72 65 61 64 79 20 70 61 69 72 65 64 20 74 6f 0d 0a 20 20 20 20 20 20 | either.already.paired.to........ |
| 57e0 | 20 20 2f 2f 2f 20 74 68 65 20 70 6c 61 79 65 72 20 6f 72 20 61 72 65 20 61 76 61 69 6c 61 62 6c | ..///.the.player.or.are.availabl |
| 5800 | 65 20 61 73 20 64 65 76 69 63 65 73 20 6e 6f 74 20 75 73 65 64 20 62 79 20 6f 74 68 65 72 20 50 | e.as.devices.not.used.by.other.P |
| 5820 | 6c 61 79 65 72 49 6e 70 75 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 | layerInputs...........///....... |
| 5840 | 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 74 68 61 74 20 74 68 69 73 20 70 72 6f 70 65 72 74 79 20 6f | ...///.Note.that.this.property.o |
| 5860 | 6e 6c 79 20 64 65 74 65 72 6d 69 6e 65 73 20 74 68 65 20 66 69 72 73 74 20 63 6f 6e 74 72 6f 6c | nly.determines.the.first.control |
| 5880 | 20 73 63 68 65 6d 65 20 74 6f 20 74 72 79 2e 20 49 66 20 75 73 69 6e 67 20 74 68 65 0d 0a 20 20 | .scheme.to.try..If.using.the.... |
| 58a0 | 20 20 20 20 20 20 2f 2f 2f 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 66 61 69 6c 73 2c 20 | ......///.control.scheme.fails,. |
| 58c0 | 50 6c 61 79 65 72 49 6e 70 75 74 20 77 69 6c 6c 20 66 61 6c 6c 20 62 61 63 6b 20 74 6f 20 74 72 | PlayerInput.will.fall.back.to.tr |
| 58e0 | 79 69 6e 67 20 74 68 65 20 6f 74 68 65 72 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 0d 0a | ying.the.other.control.schemes.. |
| 5900 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 28 69 66 20 61 6e 79 29 20 61 76 61 69 6c 61 62 6c 65 20 66 | ........///.(if.any).available.f |
| 5920 | 72 6f 6d 20 3c 73 65 65 20 63 72 65 66 3d 22 61 63 74 69 6f 6e 73 22 2f 3e 2e 0d 0a 20 20 20 20 | rom.<see.cref="actions"/>....... |
| 5940 | 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 2f 2f 2f 20 | ....///.</remarks>..........///. |
| 5960 | 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 53 77 69 74 63 68 43 75 72 72 65 6e 74 43 6f 6e 74 | <seealso.cref="SwitchCurrentCont |
| 5980 | 72 6f 6c 53 63 68 65 6d 65 28 49 6e 70 75 74 44 65 76 69 63 65 5b 5d 29 22 2f 3e 0d 0a 20 20 20 | rolScheme(InputDevice[])"/>..... |
| 59a0 | 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 63 75 72 72 65 6e 74 43 | .....///.<seealso.cref="currentC |
| 59c0 | 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 | ontrolScheme"/>..........public. |
| 59e0 | 73 74 72 69 6e 67 20 64 65 66 61 75 6c 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 0d 0a 20 20 20 | string.defaultControlScheme..... |
| 5a00 | 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 6d 5f 44 65 66 | .....{..............get.=>.m_Def |
| 5a20 | 61 75 6c 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | aultControlScheme;.............. |
| 5a40 | 73 65 74 20 3d 3e 20 6d 5f 44 65 66 61 75 6c 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 20 3d 20 | set.=>.m_DefaultControlScheme.=. |
| 5a60 | 76 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f | value;..........}............/// |
| 5a80 | 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 66 20 74 72 75 65 2c | .<summary>..........///.If.true, |
| 5aa0 | 20 64 6f 20 6e 6f 74 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 73 77 69 74 63 68 20 63 6f 6e | .do.not.automatically.switch.con |
| 5ac0 | 74 72 6f 6c 20 73 63 68 65 6d 65 73 20 65 76 65 6e 20 77 68 65 6e 20 74 68 65 72 65 20 69 73 20 | trol.schemes.even.when.there.is. |
| 5ae0 | 6f 6e 6c 79 20 61 20 73 69 6e 67 6c 65 20 70 6c 61 79 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 2f | only.a.single.player.........../ |
| 5b00 | 2f 2f 20 42 79 20 64 65 66 61 75 6c 74 2c 20 74 68 69 73 20 70 72 6f 70 65 72 74 79 20 69 73 20 | //.By.default,.this.property.is. |
| 5b20 | 66 61 6c 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 79 3e 0d 0a | false...........///.</summary>.. |
| 5b40 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 49 66 20 74 72 75 65 2c 20 64 6f 20 6e | ........///.<value>If.true,.do.n |
| 5b60 | 6f 74 20 73 77 69 74 63 68 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 20 77 68 65 6e 20 6f | ot.switch.control.schemes.when.o |
| 5b80 | 74 68 65 72 20 64 65 76 69 63 65 73 20 61 72 65 20 75 73 65 64 2e 3c 2f 76 61 6c 75 65 3e 0d 0a | ther.devices.are.used.</value>.. |
| 5ba0 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f | ........///.<remarks>........../ |
| 5bc0 | 2f 2f 20 42 79 20 64 65 66 61 75 6c 74 2c 20 77 68 65 6e 20 74 68 65 72 65 20 69 73 20 6f 6e 6c | //.By.default,.when.there.is.onl |
| 5be0 | 79 20 61 20 73 69 6e 67 6c 65 20 50 6c 61 79 65 72 49 6e 70 75 74 20 65 6e 61 62 6c 65 64 2c 20 | y.a.single.PlayerInput.enabled,. |
| 5c00 | 77 65 20 61 73 73 75 6d 65 20 74 68 61 74 20 74 68 65 20 67 61 6d 65 20 69 73 20 69 6e 0d 0a 20 | we.assume.that.the.game.is.in... |
| 5c20 | 20 20 20 20 20 20 20 2f 2f 2f 20 73 69 6e 67 6c 65 2d 70 6c 61 79 65 72 20 6d 6f 64 65 20 61 6e | .......///.single-player.mode.an |
| 5c40 | 64 20 74 68 61 74 20 74 68 65 20 70 6c 61 79 65 72 20 73 68 6f 75 6c 64 20 62 65 20 61 62 6c 65 | d.that.the.player.should.be.able |
| 5c60 | 20 74 6f 20 66 72 65 65 6c 79 20 73 77 69 74 63 68 20 62 65 74 77 65 65 6e 20 74 68 65 20 63 6f | .to.freely.switch.between.the.co |
| 5c80 | 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 73 75 70 70 6f | ntrol.schemes..........///.suppo |
| 5ca0 | 72 74 65 64 20 62 79 20 74 68 65 20 67 61 6d 65 2e 20 46 6f 72 20 65 78 61 6d 70 6c 65 2c 20 69 | rted.by.the.game..For.example,.i |
| 5cc0 | 66 20 74 68 65 20 70 6c 61 79 65 72 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 75 73 69 6e 67 20 | f.the.player.is.currently.using. |
| 5ce0 | 6d 6f 75 73 65 20 61 6e 64 20 6b 65 79 62 6f 61 72 64 2c 20 62 75 74 20 69 73 0d 0a 20 20 20 20 | mouse.and.keyboard,.but.is...... |
| 5d00 | 20 20 20 20 2f 2f 2f 20 74 68 65 6e 20 73 77 69 74 63 68 69 6e 67 20 74 6f 20 61 20 67 61 6d 65 | ....///.then.switching.to.a.game |
| 5d20 | 70 61 64 2c 20 50 6c 61 79 65 72 49 6e 70 75 74 20 73 68 6f 75 6c 64 20 61 75 74 6f 6d 61 74 69 | pad,.PlayerInput.should.automati |
| 5d40 | 63 61 6c 6c 79 20 73 77 69 74 63 68 20 74 6f 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 | cally.switch.to.the.control.sche |
| 5d60 | 6d 65 20 66 6f 72 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 67 61 6d 65 70 61 64 73 2c 20 69 66 | me.for..........///.gamepads,.if |
| 5d80 | 20 70 72 65 73 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 | .present...........///.......... |
| 5da0 | 2f 2f 2f 20 57 68 65 6e 20 74 68 65 72 65 20 69 73 20 6d 6f 72 65 20 74 68 61 6e 20 6f 6e 65 20 | ///.When.there.is.more.than.one. |
| 5dc0 | 50 6c 61 79 65 72 49 6e 70 75 74 20 6f 72 20 77 68 65 6e 20 6a 6f 69 6e 69 6e 67 20 69 73 20 65 | PlayerInput.or.when.joining.is.e |
| 5de0 | 6e 61 62 6c 65 64 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c 61 79 65 72 49 6e 70 75 74 4d 61 6e | nabled.<see.cref="PlayerInputMan |
| 5e00 | 61 67 65 72 22 2f 3e 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 69 73 20 62 65 68 61 76 | ager"/>,..........///.this.behav |
| 5e20 | 69 6f 72 20 69 73 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 74 75 72 6e 65 64 20 6f 66 66 20 | ior.is.automatically.turned.off. |
| 5e40 | 61 73 20 77 65 20 77 6f 75 6c 64 6e 27 74 20 6b 6e 6f 77 20 77 68 69 63 68 20 70 6c 61 79 65 72 | as.we.wouldn't.know.which.player |
| 5e60 | 20 69 73 20 73 77 69 74 63 68 69 6e 67 20 69 66 20 61 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 | .is.switching.if.a..........///. |
| 5e80 | 63 75 72 72 65 6e 74 6c 79 20 75 6e 70 61 69 72 65 64 20 64 65 76 69 63 65 20 69 73 20 75 73 65 | currently.unpaired.device.is.use |
| 5ea0 | 64 2e 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 42 79 20 | d...........///..........///.By. |
| 5ec0 | 73 65 74 74 69 6e 67 20 74 68 69 73 20 70 72 6f 70 65 72 74 79 20 74 6f 20 74 72 75 65 2c 20 61 | setting.this.property.to.true,.a |
| 5ee0 | 75 74 6f 2d 73 77 69 74 63 68 69 6e 67 20 6f 66 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 | uto-switching.of.control.schemes |
| 5f00 | 20 69 73 20 66 6f 72 63 69 62 6c 79 20 74 75 72 6e 65 64 20 6f 66 66 20 61 6e 64 0d 0a 20 20 20 | .is.forcibly.turned.off.and..... |
| 5f20 | 20 20 20 20 20 2f 2f 2f 20 77 69 6c 6c 20 74 68 75 73 20 6e 6f 74 20 62 65 20 70 65 72 66 6f 72 | .....///.will.thus.not.be.perfor |
| 5f40 | 6d 65 64 20 65 76 65 6e 20 69 66 20 74 68 65 72 65 20 69 73 20 6f 6e 6c 79 20 61 20 73 69 6e 67 | med.even.if.there.is.only.a.sing |
| 5f60 | 6c 65 20 50 6c 61 79 65 72 49 6e 70 75 74 20 69 6e 20 74 68 65 20 67 61 6d 65 2e 0d 0a 20 20 20 | le.PlayerInput.in.the.game...... |
| 5f80 | 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 74 68 61 74 20 | .....///..........///.Note.that. |
| 5fa0 | 79 6f 75 20 63 61 6e 20 73 74 69 6c 6c 20 73 77 69 74 63 68 20 63 6f 6e 74 72 6f 6c 20 73 63 68 | you.can.still.switch.control.sch |
| 5fc0 | 65 6d 65 73 20 6d 61 6e 75 61 6c 6c 79 20 75 73 69 6e 67 20 3c 73 65 65 0d 0a 20 20 20 20 20 20 | emes.manually.using.<see........ |
| 5fe0 | 20 20 2f 2f 2f 20 63 72 65 66 3d 22 53 77 69 74 63 68 43 75 72 72 65 6e 74 43 6f 6e 74 72 6f 6c | ..///.cref="SwitchCurrentControl |
| 6000 | 53 63 68 65 6d 65 28 73 74 72 69 6e 67 2c 49 6e 70 75 74 44 65 76 69 63 65 5b 5d 29 22 2f 3e 2e | Scheme(string,InputDevice[])"/>. |
| 6020 | 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 | ..........///.</remarks>........ |
| 6040 | 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 63 75 72 72 65 6e 74 43 6f 6e 74 | ..///.<seealso.cref="currentCont |
| 6060 | 72 6f 6c 53 63 68 65 6d 65 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c | rolScheme"/>..........///.<seeal |
| 6080 | 73 6f 20 63 72 65 66 3d 22 69 73 53 69 6e 67 6c 65 50 6c 61 79 65 72 22 2f 3e 0d 0a 20 20 20 20 | so.cref="isSinglePlayer"/>...... |
| 60a0 | 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 6e 65 76 65 72 41 75 74 6f 53 77 69 74 63 68 43 | ....public.bool.neverAutoSwitchC |
| 60c0 | 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 73 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 | ontrolSchemes..........{........ |
| 60e0 | 20 20 20 20 20 20 67 65 74 20 3d 3e 20 6d 5f 4e 65 76 65 72 41 75 74 6f 53 77 69 74 63 68 43 6f | ......get.=>.m_NeverAutoSwitchCo |
| 6100 | 6e 74 72 6f 6c 53 63 68 65 6d 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 0d 0a | ntrolSchemes;..............set.. |
| 6120 | 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 |
| 6140 | 66 20 28 6d 5f 4e 65 76 65 72 41 75 74 6f 53 77 69 74 63 68 43 6f 6e 74 72 6f 6c 53 63 68 65 6d | f.(m_NeverAutoSwitchControlSchem |
| 6160 | 65 73 20 3d 3d 20 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 | es.==.value).................... |
| 6180 | 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 6d 5f 4e 65 76 | ..return;..................m_Nev |
| 61a0 | 65 72 41 75 74 6f 53 77 69 74 63 68 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 73 20 3d 20 76 61 6c | erAutoSwitchControlSchemes.=.val |
| 61c0 | 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 65 6e 61 62 6c 65 64 | ue;..................if.(enabled |
| 61e0 | 20 26 26 20 6d 5f 4f 6e 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 55 73 65 64 48 6f 6f 6b 65 64 | .&&.m_OnUnpairedDeviceUsedHooked |
| 6200 | 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 74 6f 70 4c 69 73 74 65 | )......................StopListe |
| 6220 | 6e 69 6e 67 46 6f 72 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 41 63 74 69 76 69 74 79 28 29 3b | ningForUnpairedDeviceActivity(); |
| 6240 | 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 20 | ..............}..........}...... |
| 6260 | 20 20 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 74 68 69 73 20 69 73 20 69 6e 63 6f 6e 73 | ......////REVIEW:.this.is.incons |
| 6280 | 69 73 74 65 6e 74 3b 20 63 75 72 72 65 6e 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 20 69 73 20 | istent;.currentControlScheme.is. |
| 62a0 | 61 20 73 74 72 69 6e 67 2c 20 74 68 69 73 20 69 73 20 61 6e 20 49 6e 70 75 74 41 63 74 69 6f 6e | a.string,.this.is.an.InputAction |
| 62c0 | 4d 61 70 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 | Map..........///.<summary>...... |
| 62e0 | 20 20 20 20 2f 2f 2f 20 54 68 65 20 63 75 72 72 65 6e 74 6c 79 20 65 6e 61 62 6c 65 64 20 61 63 | ....///.The.currently.enabled.ac |
| 6300 | 74 69 6f 6e 20 6d 61 70 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 | tion.map...........///.</summary |
| 6320 | 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 52 65 66 65 72 65 6e 63 65 20 | >..........///.<value>Reference. |
| 6340 | 74 6f 20 74 68 65 20 63 75 72 72 65 6e 74 6c 79 20 65 6e 61 62 6c 65 64 20 61 63 74 69 6f 6e 20 | to.the.currently.enabled.action. |
| 6360 | 6f 72 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 20 69 66 20 6e 6f 20 61 63 74 69 6f 6e 0d 0a 20 20 20 | or.<c>null</c>.if.no.action..... |
| 6380 | 20 20 20 20 20 2f 2f 2f 20 6d 61 70 20 68 61 73 20 62 65 65 6e 20 65 6e 61 62 6c 65 64 20 62 79 | .....///.map.has.been.enabled.by |
| 63a0 | 20 50 6c 61 79 65 72 49 6e 70 75 74 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f | .PlayerInput.</value>........../ |
| 63c0 | 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 74 | //.<remarks>..........///.Note.t |
| 63e0 | 68 61 74 20 74 68 65 20 63 6f 6e 63 65 70 74 20 6f 66 20 22 63 75 72 72 65 6e 74 20 61 63 74 69 | hat.the.concept.of."current.acti |
| 6400 | 6f 6e 20 6d 61 70 22 20 69 73 20 6c 6f 63 61 6c 20 74 6f 20 50 6c 61 79 65 72 49 6e 70 75 74 2e | on.map".is.local.to.PlayerInput. |
| 6420 | 20 59 6f 75 20 63 61 6e 20 73 74 69 6c 6c 20 66 72 65 65 6c 79 0d 0a 20 20 20 20 20 20 20 20 2f | .You.can.still.freely........../ |
| 6440 | 2f 2f 20 65 6e 61 62 6c 65 20 61 6e 64 20 64 69 73 61 62 6c 65 20 61 63 74 69 6f 6e 20 6d 61 70 | //.enable.and.disable.action.map |
| 6460 | 73 20 64 69 72 65 63 74 6c 79 20 6f 6e 20 74 68 65 20 3c 73 65 65 20 63 72 65 66 3d 22 61 63 74 | s.directly.on.the.<see.cref="act |
| 6480 | 69 6f 6e 73 22 2f 3e 20 61 73 73 65 74 2e 20 54 68 69 73 20 70 72 6f 70 65 72 74 79 0d 0a 20 20 | ions"/>.asset..This.property.... |
| 64a0 | 20 20 20 20 20 20 2f 2f 2f 20 6f 6e 6c 79 20 74 72 61 63 6b 73 20 77 68 69 63 68 20 61 63 74 69 | ......///.only.tracks.which.acti |
| 64c0 | 6f 6e 20 6d 61 70 20 68 61 73 20 62 65 65 6e 20 65 6e 61 62 6c 65 64 20 75 6e 64 65 72 20 74 68 | on.map.has.been.enabled.under.th |
| 64e0 | 65 20 63 6f 6e 74 72 6f 6c 20 6f 66 20 50 6c 61 79 65 72 49 6e 70 75 74 2c 20 69 2e 65 2e 20 65 | e.control.of.PlayerInput,.i.e..e |
| 6500 | 69 74 68 65 72 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 62 79 20 6d 65 61 6e 73 20 6f 66 20 3c | ither..........///.by.means.of.< |
| 6520 | 73 65 65 20 63 72 65 66 3d 22 64 65 66 61 75 6c 74 41 63 74 69 6f 6e 4d 61 70 22 2f 3e 20 6f 72 | see.cref="defaultActionMap"/>.or |
| 6540 | 20 62 79 20 75 73 69 6e 67 20 3c 73 65 65 20 63 72 65 66 3d 22 53 77 69 74 63 68 43 75 72 72 65 | .by.using.<see.cref="SwitchCurre |
| 6560 | 6e 74 41 63 74 69 6f 6e 4d 61 70 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 | ntActionMap"/>...........///.</r |
| 6580 | 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 72 | emarks>..........///.<seealso.cr |
| 65a0 | 65 66 3d 22 53 77 69 74 63 68 43 75 72 72 65 6e 74 41 63 74 69 6f 6e 4d 61 70 22 2f 3e 0d 0a 20 | ef="SwitchCurrentActionMap"/>... |
| 65c0 | 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 70 75 74 41 63 74 69 6f 6e 4d 61 70 20 63 75 72 | .......public.InputActionMap.cur |
| 65e0 | 72 65 6e 74 41 63 74 69 6f 6e 4d 61 70 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 | rentActionMap..........{........ |
| 6600 | 20 20 20 20 20 20 67 65 74 20 3d 3e 20 6d 5f 43 75 72 72 65 6e 74 41 63 74 69 6f 6e 4d 61 70 3b | ......get.=>.m_CurrentActionMap; |
| 6620 | 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..............{ |
| 6640 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 75 72 72 65 6e 74 41 63 74 69 6f | ..................m_CurrentActio |
| 6660 | 6e 4d 61 70 3f 2e 44 69 73 61 62 6c 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | nMap?.Disable();................ |
| 6680 | 20 20 6d 5f 43 75 72 72 65 6e 74 41 63 74 69 6f 6e 4d 61 70 20 3d 20 76 61 6c 75 65 3b 0d 0a 20 | ..m_CurrentActionMap.=.value;... |
| 66a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 75 72 72 65 6e 74 41 63 74 69 6f 6e 4d 61 | ...............m_CurrentActionMa |
| 66c0 | 70 3f 2e 45 6e 61 62 6c 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 | p?.Enable();..............}..... |
| 66e0 | 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d | .....}............///.<summary>. |
| 6700 | 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4e 61 6d 65 20 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 | .........///.Name.(see.<see.cref |
| 6720 | 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 4d 61 70 2e 6e 61 6d 65 22 2f 3e 29 20 6f 72 20 49 44 20 | ="InputActionMap.name"/>).or.ID. |
| 6740 | 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 4d 61 70 2e 69 | (see.<see.cref="InputActionMap.i |
| 6760 | 64 22 2f 3e 29 20 6f 66 20 74 68 65 20 61 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f | d"/>).of.the.action........../// |
| 6780 | 20 6d 61 70 20 74 6f 20 65 6e 61 62 6c 65 20 62 79 20 64 65 66 61 75 6c 74 2e 0d 0a 20 20 20 20 | .map.to.enable.by.default....... |
| 67a0 | 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 2f 20 | ....///.</summary>..........///. |
| 67c0 | 3c 76 61 6c 75 65 3e 41 63 74 69 6f 6e 20 6d 61 70 20 74 6f 20 65 6e 61 62 6c 65 20 62 79 20 64 | <value>Action.map.to.enable.by.d |
| 67e0 | 65 66 61 75 6c 74 20 6f 72 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e 3c 2f 76 61 6c 75 65 3e 0d 0a | efault.or.<c>null</c>.</value>.. |
| 6800 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f | ........///.<remarks>........../ |
| 6820 | 2f 2f 20 42 79 20 64 65 66 61 75 6c 74 2c 20 77 68 65 6e 20 65 6e 61 62 6c 65 64 2c 20 50 6c 61 | //.By.default,.when.enabled,.Pla |
| 6840 | 79 65 72 49 6e 70 75 74 20 77 69 6c 6c 20 6e 6f 74 20 65 6e 61 62 6c 65 20 61 6e 79 20 6f 66 20 | yerInput.will.not.enable.any.of. |
| 6860 | 74 68 65 20 61 63 74 69 6f 6e 73 20 69 6e 20 74 68 65 20 3c 73 65 65 20 63 72 65 66 3d 22 61 63 | the.actions.in.the.<see.cref="ac |
| 6880 | 74 69 6f 6e 73 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 73 73 65 74 2e 20 42 79 20 | tions"/>..........///.asset..By. |
| 68a0 | 73 65 74 74 69 6e 67 20 74 68 69 73 20 70 72 6f 70 65 72 74 79 2c 20 68 6f 77 65 76 65 72 2c 20 | setting.this.property,.however,. |
| 68c0 | 50 6c 61 79 65 72 49 6e 70 75 74 20 63 61 6e 20 62 65 20 6d 61 64 65 20 74 6f 20 61 75 74 6f 6d | PlayerInput.can.be.made.to.autom |
| 68e0 | 61 74 69 63 61 6c 6c 79 20 65 6e 61 62 6c 65 20 74 68 65 20 72 65 73 70 65 63 74 69 76 65 0d 0a | atically.enable.the.respective.. |
| 6900 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 63 74 69 6f 6e 20 6d 61 70 2e 0d 0a 20 20 20 20 20 20 20 | ........///.action.map.......... |
| 6920 | 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 65 | .///.</remarks>..........///.<se |
| 6940 | 65 61 6c 73 6f 20 63 72 65 66 3d 22 63 75 72 72 65 6e 74 41 63 74 69 6f 6e 4d 61 70 22 2f 3e 0d | ealso.cref="currentActionMap"/>. |
| 6960 | 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 53 77 69 74 | .........///.<seealso.cref="Swit |
| 6980 | 63 68 43 75 72 72 65 6e 74 41 63 74 69 6f 6e 4d 61 70 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 | chCurrentActionMap"/>..........p |
| 69a0 | 75 62 6c 69 63 20 73 74 72 69 6e 67 20 64 65 66 61 75 6c 74 41 63 74 69 6f 6e 4d 61 70 0d 0a 20 | ublic.string.defaultActionMap... |
| 69c0 | 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 6d 5f 44 | .......{..............get.=>.m_D |
| 69e0 | 65 66 61 75 6c 74 41 63 74 69 6f 6e 4d 61 70 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 65 | efaultActionMap;..............se |
| 6a00 | 74 20 3d 3e 20 6d 5f 44 65 66 61 75 6c 74 41 63 74 69 6f 6e 4d 61 70 20 3d 20 76 61 6c 75 65 3b | t.=>.m_DefaultActionMap.=.value; |
| 6a20 | 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 73 75 6d 6d | ..........}............///.<summ |
| 6a40 | 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 65 74 65 72 6d 69 6e 65 73 20 68 6f 77 | ary>..........///.Determines.how |
| 6a60 | 20 74 68 65 20 63 6f 6d 70 6f 6e 65 6e 74 20 6e 6f 74 69 66 69 65 73 20 6c 69 73 74 65 6e 65 72 | .the.component.notifies.listener |
| 6a80 | 73 20 61 62 6f 75 74 20 69 6e 70 75 74 20 61 63 74 69 6f 6e 73 20 61 6e 64 20 6f 74 68 65 72 20 | s.about.input.actions.and.other. |
| 6aa0 | 69 6e 70 75 74 2d 72 65 6c 61 74 65 64 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 65 76 65 6e 74 | input-related..........///.event |
| 6ac0 | 73 20 70 65 72 74 61 69 6e 69 6e 67 20 74 6f 20 74 68 65 20 70 6c 61 79 65 72 2e 0d 0a 20 20 20 | s.pertaining.to.the.player...... |
| 6ae0 | 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 2f | .....///.</summary>........../// |
| 6b00 | 20 3c 76 61 6c 75 65 3e 48 6f 77 20 74 6f 20 74 72 69 67 67 65 72 20 6e 6f 74 69 66 69 63 61 74 | .<value>How.to.trigger.notificat |
| 6b20 | 69 6f 6e 73 20 6f 6e 20 65 76 65 6e 74 73 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 | ions.on.events.</value>......... |
| 6b40 | 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 42 79 20 64 | .///.<remarks>..........///.By.d |
| 6b60 | 65 66 61 75 6c 74 2c 20 74 68 65 20 63 6f 6d 70 6f 6e 65 6e 74 20 77 69 6c 6c 20 75 73 65 20 3c | efault,.the.component.will.use.< |
| 6b80 | 73 65 65 20 63 72 65 66 3d 22 47 61 6d 65 4f 62 6a 65 63 74 2e 53 65 6e 64 4d 65 73 73 61 67 65 | see.cref="GameObject.SendMessage |
| 6ba0 | 28 73 74 72 69 6e 67 2c 6f 62 6a 65 63 74 29 22 2f 3e 20 74 6f 20 73 65 6e 64 20 6d 65 73 73 61 | (string,object)"/>.to.send.messa |
| 6bc0 | 67 65 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 6f 20 74 68 65 20 3c 73 65 65 20 63 72 65 | ges..........///.to.the.<see.cre |
| 6be0 | 66 3d 22 47 61 6d 65 4f 62 6a 65 63 74 22 2f 3e 2e 20 54 68 69 73 20 63 61 6e 20 62 65 20 63 68 | f="GameObject"/>..This.can.be.ch |
| 6c00 | 61 6e 67 65 64 20 62 79 20 73 65 6c 65 63 74 69 6e 67 20 61 20 64 69 66 66 65 72 65 6e 74 20 3c | anged.by.selecting.a.different.< |
| 6c20 | 73 65 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 | see.cref="UnityEngine.InputSyste |
| 6c40 | 6d 2e 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 22 2f 3e 0d 0a 20 20 20 20 20 20 | m.PlayerNotifications"/>........ |
| 6c60 | 20 20 2f 2f 2f 20 62 65 68 61 76 69 6f 72 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 | ..///.behavior...........///.</r |
| 6c80 | 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 72 | emarks>..........///.<seealso.cr |
| 6ca0 | 65 66 3d 22 61 63 74 69 6f 6e 45 76 65 6e 74 73 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f | ef="actionEvents"/>........../// |
| 6cc0 | 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 64 65 76 69 63 65 4c 6f 73 74 45 76 65 6e 74 22 | .<seealso.cref="deviceLostEvent" |
| 6ce0 | 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 64 | />..........///.<seealso.cref="d |
| 6d00 | 65 76 69 63 65 52 65 67 61 69 6e 65 64 45 76 65 6e 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 | eviceRegainedEvent"/>..........p |
| 6d20 | 75 62 6c 69 63 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 20 6e 6f 74 69 66 69 | ublic.PlayerNotifications.notifi |
| 6d40 | 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 | cationBehavior..........{....... |
| 6d60 | 20 20 20 20 20 20 20 67 65 74 20 3d 3e 20 6d 5f 4e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 | .......get.=>.m_NotificationBeha |
| 6d80 | 76 69 6f 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 0d 0a 20 20 20 20 20 20 20 20 | vior;..............set.......... |
| 6da0 | 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 4e 6f 74 | ....{..................if.(m_Not |
| 6dc0 | 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 20 3d 3d 20 76 61 6c 75 65 29 0d 0a 20 20 20 | ificationBehavior.==.value)..... |
| 6de0 | 20 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 0d 0a 20 20 20 20 | .................return;........ |
| 6e00 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 45 6e 61 62 6c 65 64 29 0d 0a 20 20 20 20 | ............if.(m_Enabled)...... |
| 6e20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 55 6e 69 6e 69 74 69 61 6c 69 7a 65 41 63 74 69 | ................UninitializeActi |
| 6e40 | 6f 6e 73 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4e 6f 74 69 | ons();....................m_Noti |
| 6e60 | 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 20 3d 20 76 61 6c 75 65 3b 0d 0a 0d 0a 20 20 20 | ficationBehavior.=.value;....... |
| 6e80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 45 6e 61 62 6c 65 64 29 0d 0a 20 20 20 | .............if.(m_Enabled)..... |
| 6ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 69 74 69 61 6c 69 7a 65 41 63 74 69 6f | .................InitializeActio |
| 6ec0 | 6e 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d | ns();..............}..........}. |
| 6ee0 | 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 20 | ...........///.<summary>........ |
| 6f00 | 20 20 2f 2f 2f 20 4c 69 73 74 20 6f 66 20 65 76 65 6e 74 73 20 69 6e 76 6f 6b 65 64 20 69 6e 20 | ..///.List.of.events.invoked.in. |
| 6f20 | 72 65 73 70 6f 6e 73 65 20 74 6f 20 61 63 74 69 6f 6e 73 20 62 65 69 6e 67 20 74 72 69 67 67 65 | response.to.actions.being.trigge |
| 6f40 | 72 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 | red...........///.</summary>.... |
| 6f60 | 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f | ......///.<remarks>........../// |
| 6f80 | 20 54 68 69 73 20 61 72 72 61 79 20 69 73 20 6f 6e 6c 79 20 75 73 65 64 20 69 66 20 3c 73 65 65 | .This.array.is.only.used.if.<see |
| 6fa0 | 20 63 72 65 66 3d 22 6e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 22 2f 3e 20 69 | .cref="notificationBehavior"/>.i |
| 6fc0 | 73 20 73 65 74 20 74 6f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d | s.set.to..........///.<see.cref= |
| 6fe0 | 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 50 6c 61 79 65 72 4e | "UnityEngine.InputSystem.PlayerN |
| 7000 | 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 49 6e 76 6f 6b 65 55 6e 69 74 79 45 76 65 6e 74 73 22 2f | otifications.InvokeUnityEvents"/ |
| 7020 | 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 3e 0d 0a 20 20 20 20 | >...........///.</remarks>...... |
| 7040 | 20 20 20 20 70 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 41 63 74 69 6f 6e 45 | ....public.ReadOnlyArray<ActionE |
| 7060 | 76 65 6e 74 3e 20 61 63 74 69 6f 6e 45 76 65 6e 74 73 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 | vent>.actionEvents..........{... |
| 7080 | 20 20 20 20 20 20 20 20 20 20 20 67 65 74 20 3d 3e 20 6d 5f 41 63 74 69 6f 6e 45 76 65 6e 74 73 | ...........get.=>.m_ActionEvents |
| 70a0 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ;..............set.............. |
| 70c0 | 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 45 6e 61 62 6c 65 64 | {..................if.(m_Enabled |
| 70e0 | 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 55 6e 69 6e 69 74 69 61 6c | )......................Uninitial |
| 7100 | 69 7a 65 41 63 74 69 6f 6e 73 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | izeActions();................... |
| 7120 | 20 6d 5f 41 63 74 69 6f 6e 45 76 65 6e 74 73 20 3d 20 76 61 6c 75 65 2e 54 6f 41 72 72 61 79 28 | .m_ActionEvents.=.value.ToArray( |
| 7140 | 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 45 6e 61 62 | );....................if.(m_Enab |
| 7160 | 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 49 6e 69 74 69 61 | led)......................Initia |
| 7180 | 6c 69 7a 65 41 63 74 69 6f 6e 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 | lizeActions();..............}... |
| 71a0 | 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 | .......}............///.<summary |
| 71c0 | 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 45 76 65 6e 74 20 74 68 61 74 20 69 73 20 74 72 69 | >..........///.Event.that.is.tri |
| 71e0 | 67 67 65 72 65 64 20 77 68 65 6e 20 74 68 65 20 70 6c 61 79 65 72 20 6c 6f 73 65 73 20 61 20 64 | ggered.when.the.player.loses.a.d |
| 7200 | 65 76 69 63 65 20 28 65 2e 67 2e 20 74 68 65 20 62 61 74 74 65 72 69 65 73 20 72 75 6e 20 6f 75 | evice.(e.g..the.batteries.run.ou |
| 7220 | 74 29 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 20 20 | t)...........///.</summary>..... |
| 7240 | 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 | .....///.<remarks>..........///. |
| 7260 | 54 68 69 73 20 65 76 65 6e 74 20 69 73 20 6f 6e 6c 79 20 75 73 65 64 20 69 66 20 3c 73 65 65 20 | This.event.is.only.used.if.<see. |
| 7280 | 63 72 65 66 3d 22 6e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 22 2f 3e 20 69 73 | cref="notificationBehavior"/>.is |
| 72a0 | 20 73 65 74 20 74 6f 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 | .set.to..........///.<see.cref=" |
| 72c0 | 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 50 6c 61 79 65 72 4e 6f | UnityEngine.InputSystem.PlayerNo |
| 72e0 | 74 69 66 69 63 61 74 69 6f 6e 73 2e 49 6e 76 6f 6b 65 55 6e 69 74 79 45 76 65 6e 74 73 22 2f 3e | tifications.InvokeUnityEvents"/> |
| 7300 | 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 | ...........///.</remarks>....... |
| 7320 | 20 20 20 70 75 62 6c 69 63 20 44 65 76 69 63 65 4c 6f 73 74 45 76 65 6e 74 20 64 65 76 69 63 65 | ...public.DeviceLostEvent.device |
| 7340 | 4c 6f 73 74 45 76 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 | LostEvent..........{............ |
| 7360 | 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 20 20 20 20 20 20 20 | ..get..............{............ |
| 7380 | 20 20 20 20 20 20 69 66 20 28 6d 5f 44 65 76 69 63 65 4c 6f 73 74 45 76 65 6e 74 20 3d 3d 20 6e | ......if.(m_DeviceLostEvent.==.n |
| 73a0 | 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 44 65 76 69 | ull)......................m_Devi |
| 73c0 | 63 65 4c 6f 73 74 45 76 65 6e 74 20 3d 20 6e 65 77 20 44 65 76 69 63 65 4c 6f 73 74 45 76 65 6e | ceLostEvent.=.new.DeviceLostEven |
| 73e0 | 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 44 | t();..................return.m_D |
| 7400 | 65 76 69 63 65 4c 6f 73 74 45 76 65 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a | eviceLostEvent;..............}.. |
| 7420 | 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 | ........}............///.<summar |
| 7440 | 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 45 76 65 6e 74 20 74 68 61 74 20 69 73 20 74 72 | y>..........///.Event.that.is.tr |
| 7460 | 69 67 67 65 72 65 64 20 77 68 65 6e 20 74 68 65 20 70 6c 61 79 65 72 20 72 65 63 6f 76 65 72 73 | iggered.when.the.player.recovers |
| 7480 | 20 66 72 6f 6d 20 64 65 76 69 63 65 20 6c 6f 73 73 20 61 6e 64 20 69 73 20 67 6f 6f 64 20 74 6f | .from.device.loss.and.is.good.to |
| 74a0 | 20 67 6f 20 61 67 61 69 6e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 | .go.again...........///.</summar |
| 74c0 | 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 0a 20 20 20 20 20 | y>..........///.<remarks>....... |
| 74e0 | 20 20 20 2f 2f 2f 20 54 68 69 73 20 65 76 65 6e 74 20 69 73 20 6f 6e 6c 79 20 75 73 65 64 20 69 | ...///.This.event.is.only.used.i |
| 7500 | 66 20 3c 73 65 65 20 63 72 65 66 3d 22 6e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f | f.<see.cref="notificationBehavio |
| 7520 | 72 22 2f 3e 20 69 73 20 73 65 74 20 74 6f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 | r"/>.is.set.to..........///.<see |
| 7540 | 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 50 | .cref="UnityEngine.InputSystem.P |
| 7560 | 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 49 6e 76 6f 6b 65 55 6e 69 74 79 45 76 | layerNotifications.InvokeUnityEv |
| 7580 | 65 6e 74 73 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 3e | ents"/>...........///.</remarks> |
| 75a0 | 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 45 | ..........public.DeviceRegainedE |
| 75c0 | 76 65 6e 74 20 64 65 76 69 63 65 52 65 67 61 69 6e 65 64 45 76 65 6e 74 0d 0a 20 20 20 20 20 20 | vent.deviceRegainedEvent........ |
| 75e0 | 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 20 20 | ..{..............get............ |
| 7600 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 44 65 76 69 63 | ..{..................if.(m_Devic |
| 7620 | 65 52 65 67 61 69 6e 65 64 45 76 65 6e 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 | eRegainedEvent.==.null)......... |
| 7640 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 45 76 65 | .............m_DeviceRegainedEve |
| 7660 | 6e 74 20 3d 20 6e 65 77 20 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 45 76 65 6e 74 28 29 3b 0d | nt.=.new.DeviceRegainedEvent();. |
| 7680 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 44 65 76 69 63 65 | .................return.m_Device |
| 76a0 | 52 65 67 61 69 6e 65 64 45 76 65 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 | RegainedEvent;..............}... |
| 76c0 | 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 | .......}............///.<summary |
| 76e0 | 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 45 76 65 6e 74 20 74 68 61 74 20 69 73 20 74 72 69 | >..........///.Event.that.is.tri |
| 7700 | 67 67 65 72 65 64 20 77 68 65 6e 20 74 68 65 20 63 6f 6e 74 72 6f 6c 73 20 75 73 65 64 20 62 79 | ggered.when.the.controls.used.by |
| 7720 | 20 74 68 65 20 70 6c 61 79 65 72 20 63 68 61 6e 67 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f | .the.player.change.........../// |
| 7740 | 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 72 65 6d 61 72 6b | .</summary>..........///.<remark |
| 7760 | 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 65 76 65 6e 74 20 69 73 20 6f 6e | s>..........///.This.event.is.on |
| 7780 | 6c 79 20 75 73 65 64 20 69 66 20 3c 73 65 65 20 63 72 65 66 3d 22 6e 6f 74 69 66 69 63 61 74 69 | ly.used.if.<see.cref="notificati |
| 77a0 | 6f 6e 42 65 68 61 76 69 6f 72 22 2f 3e 20 69 73 20 73 65 74 20 74 6f 0d 0a 20 20 20 20 20 20 20 | onBehavior"/>.is.set.to......... |
| 77c0 | 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 | .///.<see.cref="UnityEngine.Inpu |
| 77e0 | 74 53 79 73 74 65 6d 2e 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 49 6e 76 6f | tSystem.PlayerNotifications.Invo |
| 7800 | 6b 65 55 6e 69 74 79 45 76 65 6e 74 73 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a | keUnityEvents"/>...........///.. |
| 7820 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 65 76 65 6e 74 20 69 73 20 74 72 69 67 67 65 72 | ........///.The.event.is.trigger |
| 7840 | 20 77 68 65 6e 20 74 68 65 20 73 65 74 20 6f 66 20 3c 73 65 65 20 63 72 65 66 3d 22 64 65 76 69 | .when.the.set.of.<see.cref="devi |
| 7860 | 63 65 73 22 2f 3e 20 75 73 65 64 20 62 79 20 74 68 65 20 70 6c 61 79 65 72 20 63 68 61 6e 67 65 | ces"/>.used.by.the.player.change |
| 7880 | 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 77 68 65 6e 20 74 68 65 20 70 6c 61 79 65 72 20 73 | ,..........///.when.the.player.s |
| 78a0 | 77 69 74 63 68 65 73 20 74 6f 20 61 20 64 69 66 66 65 72 65 6e 74 20 63 6f 6e 74 72 6f 6c 20 73 | witches.to.a.different.control.s |
| 78c0 | 63 68 65 6d 65 20 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 63 75 72 72 65 6e 74 43 6f 6e | cheme.(see.<see.cref="currentCon |
| 78e0 | 74 72 6f 6c 53 63 68 65 6d 65 22 2f 3e 29 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f 72 20 | trolScheme"/>),..........///.or. |
| 7900 | 77 68 65 6e 20 74 68 65 20 62 69 6e 64 69 6e 67 73 20 75 73 65 64 20 62 79 20 74 68 65 20 70 6c | when.the.bindings.used.by.the.pl |
| 7920 | 61 79 65 72 20 61 72 65 20 63 68 61 6e 67 65 64 20 28 65 2e 67 2e 20 77 68 65 6e 20 72 65 62 69 | ayer.are.changed.(e.g..when.rebi |
| 7940 | 6e 64 69 6e 67 20 74 68 65 6d 29 2e 20 41 6c 73 6f 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 | nding.them)..Also,..........///. |
| 7960 | 66 6f 72 20 3c 73 65 65 20 63 72 65 66 3d 22 4b 65 79 62 6f 61 72 64 22 2f 3e 20 64 65 76 69 63 | for.<see.cref="Keyboard"/>.devic |
| 7980 | 65 73 2c 20 74 68 65 20 65 76 65 6e 74 20 69 73 20 74 72 69 67 67 65 72 65 64 20 77 68 65 6e 20 | es,.the.event.is.triggered.when. |
| 79a0 | 74 68 65 20 63 75 72 72 65 6e 74 6c 79 20 75 73 65 64 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 | the.currently.used..........///. |
| 79c0 | 6b 65 79 62 6f 61 72 64 20 6c 61 79 6f 75 74 20 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 | keyboard.layout.(see.<see.cref=" |
| 79e0 | 4b 65 79 62 6f 61 72 64 2e 6b 65 79 62 6f 61 72 64 4c 61 79 6f 75 74 22 2f 3e 29 20 63 68 61 6e | Keyboard.keyboardLayout"/>).chan |
| 7a00 | 67 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 | ges...........///.</remarks>.... |
| 7a20 | 20 20 20 20 20 20 70 75 62 6c 69 63 20 43 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 65 64 45 76 65 6e | ......public.ControlsChangedEven |
| 7a40 | 74 20 63 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 65 64 45 76 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 | t.controlsChangedEvent.......... |
| 7a60 | 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 20 20 20 20 | {..............get.............. |
| 7a80 | 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 6f 6e 74 72 6f 6c | {..................if.(m_Control |
| 7aa0 | 73 43 68 61 6e 67 65 64 45 76 65 6e 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 | sChangedEvent.==.null).......... |
| 7ac0 | 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 65 64 45 76 65 | ............m_ControlsChangedEve |
| 7ae0 | 6e 74 20 3d 20 6e 65 77 20 43 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 65 64 45 76 65 6e 74 28 29 3b | nt.=.new.ControlsChangedEvent(); |
| 7b00 | 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 6d 5f 43 6f 6e 74 72 | ..................return.m_Contr |
| 7b20 | 6f 6c 73 43 68 61 6e 67 65 64 45 76 65 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d | olsChangedEvent;..............}. |
| 7b40 | 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 | .........}............///.<summa |
| 7b60 | 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 66 20 3c 73 65 65 20 63 72 65 66 3d 22 6e | ry>..........///.If.<see.cref="n |
| 7b80 | 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 22 2f 3e 20 69 73 20 73 65 74 20 74 6f | otificationBehavior"/>.is.set.to |
| 7ba0 | 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e | .<see.cref="PlayerNotifications. |
| 7bc0 | 49 6e 76 6f 6b 65 43 53 68 61 72 70 45 76 65 6e 74 73 22 2f 3e 2c 20 74 68 69 73 0d 0a 20 20 20 | InvokeCSharpEvents"/>,.this..... |
| 7be0 | 20 20 20 20 20 2f 2f 2f 20 65 76 65 6e 74 20 69 73 20 74 72 69 67 67 65 72 65 64 20 77 68 65 6e | .....///.event.is.triggered.when |
| 7c00 | 20 61 6e 20 61 63 74 69 6f 6e 20 66 69 72 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c | .an.action.fires...........///.< |
| 7c20 | 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 43 61 | /summary>..........///.<value>Ca |
| 7c40 | 6c 6c 62 61 63 6b 73 20 74 68 61 74 20 67 65 74 20 63 61 6c 6c 65 64 20 77 68 65 6e 20 61 6e 20 | llbacks.that.get.called.when.an. |
| 7c60 | 61 63 74 69 6f 6e 20 74 72 69 67 67 65 72 73 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 | action.triggers.</value>........ |
| 7c80 | 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 66 20 | ..///.<remarks>..........///.If. |
| 7ca0 | 3c 73 65 65 20 63 72 65 66 3d 22 6e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 22 | <see.cref="notificationBehavior" |
| 7cc0 | 2f 3e 20 69 73 20 6e 6f 74 20 73 65 74 20 74 6f 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c 61 79 | />.is.not.set.to.<see.cref="Play |
| 7ce0 | 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 49 6e 76 6f 6b 65 43 53 68 61 72 70 45 76 65 6e | erNotifications.InvokeCSharpEven |
| 7d00 | 74 73 22 2f 3e 2c 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 76 61 6c 75 65 20 6f 66 | ts"/>,.the..........///.value.of |
| 7d20 | 20 74 68 69 73 20 70 72 6f 70 65 72 74 79 20 69 73 20 69 67 6e 6f 72 65 64 2e 0d 0a 20 20 20 20 | .this.property.is.ignored....... |
| 7d40 | 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 63 61 6c 6c 62 61 63 | ....///..........///.The.callbac |
| 7d60 | 6b 73 20 61 72 65 20 63 61 6c 6c 65 64 20 69 6e 20 73 79 6e 63 20 28 61 6e 64 20 77 69 74 68 20 | ks.are.called.in.sync.(and.with. |
| 7d80 | 74 68 65 20 73 61 6d 65 20 61 72 67 75 6d 65 6e 74 29 20 77 69 74 68 20 3c 73 65 65 20 63 72 65 | the.same.argument).with.<see.cre |
| 7da0 | 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e 73 74 61 72 74 65 64 22 2f 3e 2c 0d 0a 20 20 20 20 | f="InputAction.started"/>,...... |
| 7dc0 | 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e 70 | ....///.<see.cref="InputAction.p |
| 7de0 | 65 72 66 6f 72 6d 65 64 22 2f 3e 2c 20 61 6e 64 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 | erformed"/>,.and.<see.cref="Inpu |
| 7e00 | 74 41 63 74 69 6f 6e 2e 63 61 6e 63 65 6c 65 64 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f | tAction.canceled"/>...........// |
| 7e20 | 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 61 6c | /.</remarks>..........///.<seeal |
| 7e40 | 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 4d 61 70 2e 61 63 74 69 6f 6e 54 72 | so.cref="InputActionMap.actionTr |
| 7e60 | 69 67 67 65 72 65 64 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f | iggered"/>..........///.<seealso |
| 7e80 | 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e 73 74 61 72 74 65 64 22 2f 3e 0d 0a 20 | .cref="InputAction.started"/>... |
| 7ea0 | 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 49 6e 70 75 74 41 | .......///.<seealso.cref="InputA |
| 7ec0 | 63 74 69 6f 6e 2e 70 65 72 66 6f 72 6d 65 64 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 | ction.performed"/>..........///. |
| 7ee0 | 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 2e 63 61 6e 63 65 | <seealso.cref="InputAction.cance |
| 7f00 | 6c 65 64 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 | led"/>..........///.<seealso.cre |
| 7f20 | 66 3d 22 61 63 74 69 6f 6e 73 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 65 76 | f="actions"/>..........public.ev |
| 7f40 | 65 6e 74 20 41 63 74 69 6f 6e 3c 49 6e 70 75 74 41 63 74 69 6f 6e 2e 43 61 6c 6c 62 61 63 6b 43 | ent.Action<InputAction.CallbackC |
| 7f60 | 6f 6e 74 65 78 74 3e 20 6f 6e 41 63 74 69 6f 6e 54 72 69 67 67 65 72 65 64 0d 0a 20 20 20 20 20 | ontext>.onActionTriggered....... |
| 7f80 | 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 61 64 64 0d 0a 20 20 20 20 20 20 20 20 20 | ...{..............add........... |
| 7fa0 | 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 20 | ...{..................if.(value. |
| 7fc0 | 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 | ==.null)......................th |
| 7fe0 | 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 | row.new.ArgumentNullException(na |
| 8000 | 6d 65 6f 66 28 76 61 6c 75 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d | meof(value));..................m |
| 8020 | 5f 41 63 74 69 6f 6e 54 72 69 67 67 65 72 65 64 43 61 6c 6c 62 61 63 6b 73 2e 41 70 70 65 6e 64 | _ActionTriggeredCallbacks.Append |
| 8040 | 57 69 74 68 43 61 70 61 63 69 74 79 28 76 61 6c 75 65 2c 20 35 29 3b 0d 0a 20 20 20 20 20 20 20 | WithCapacity(value,.5);......... |
| 8060 | 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 6d 6f 76 65 0d 0a 20 20 20 20 | .....}..............remove...... |
| 8080 | 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 | ........{..................if.(v |
| 80a0 | 61 6c 75 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | alue.==.null)................... |
| 80c0 | 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 | ...throw.new.ArgumentNullExcepti |
| 80e0 | 6f 6e 28 6e 61 6d 65 6f 66 28 76 61 6c 75 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | on(nameof(value));.............. |
| 8100 | 20 20 20 20 76 61 72 20 69 6e 64 65 78 20 3d 20 6d 5f 41 63 74 69 6f 6e 54 72 69 67 67 65 72 65 | ....var.index.=.m_ActionTriggere |
| 8120 | 64 43 61 6c 6c 62 61 63 6b 73 2e 49 6e 64 65 78 4f 66 28 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 | dCallbacks.IndexOf(value);...... |
| 8140 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 6e 64 65 78 20 21 3d 20 2d 31 29 0d 0a 20 20 | ............if.(index.!=.-1).... |
| 8160 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 63 74 69 6f 6e 54 72 69 67 67 65 | ..................m_ActionTrigge |
| 8180 | 72 65 64 43 61 6c 6c 62 61 63 6b 73 2e 52 65 6d 6f 76 65 41 74 57 69 74 68 43 61 70 61 63 69 74 | redCallbacks.RemoveAtWithCapacit |
| 81a0 | 79 28 69 6e 64 65 78 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 | y(index);..............}........ |
| 81c0 | 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 20 | ..}............///.<summary>.... |
| 81e0 | 20 20 20 20 20 20 2f 2f 2f 20 49 66 20 3c 73 65 65 20 63 72 65 66 3d 22 6e 6f 74 69 66 69 63 61 | ......///.If.<see.cref="notifica |
| 8200 | 74 69 6f 6e 42 65 68 61 76 69 6f 72 22 2f 3e 20 69 73 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c | tionBehavior"/>.is.<see.cref="Pl |
| 8220 | 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 49 6e 76 6f 6b 65 43 53 68 61 72 70 45 76 | ayerNotifications.InvokeCSharpEv |
| 8240 | 65 6e 74 73 22 2f 3e 2c 20 74 68 69 73 20 65 76 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f | ents"/>,.this.event........../// |
| 8260 | 20 69 73 20 74 72 69 67 67 65 72 65 64 20 77 68 65 6e 20 61 20 64 65 76 69 63 65 20 70 61 69 72 | .is.triggered.when.a.device.pair |
| 8280 | 65 64 20 74 6f 20 74 68 65 20 70 6c 61 79 65 72 20 69 73 20 64 69 73 63 6f 6e 6e 65 63 74 65 64 | ed.to.the.player.is.disconnected |
| 82a0 | 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 20 20 20 20 | ...........///.</summary>....... |
| 82c0 | 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 43 61 6c 6c 62 61 63 6b 73 20 74 68 61 74 20 67 65 74 | ...///.<value>Callbacks.that.get |
| 82e0 | 20 63 61 6c 6c 65 64 20 77 68 65 6e 20 74 68 65 20 70 6c 61 79 65 72 20 6c 6f 73 65 73 20 61 20 | .called.when.the.player.loses.a. |
| 8300 | 64 65 76 69 63 65 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 | device.</value>..........///.<re |
| 8320 | 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 66 20 3c 73 65 65 20 63 72 65 66 | marks>..........///.If.<see.cref |
| 8340 | 3d 22 6e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 22 2f 3e 20 69 73 20 6e 6f 74 | ="notificationBehavior"/>.is.not |
| 8360 | 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e | .<see.cref="PlayerNotifications. |
| 8380 | 49 6e 76 6f 6b 65 43 53 68 61 72 70 45 76 65 6e 74 73 22 2f 3e 2c 20 74 68 65 20 76 61 6c 75 65 | InvokeCSharpEvents"/>,.the.value |
| 83a0 | 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f 66 20 74 68 69 73 20 70 72 6f 70 65 72 74 79 20 69 | ..........///.of.this.property.i |
| 83c0 | 73 20 69 67 6e 6f 72 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 | s.ignored...........///......... |
| 83e0 | 20 2f 2f 2f 20 54 68 65 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74 68 65 20 70 6c 61 79 65 72 20 | .///.The.argument.is.the.player. |
| 8400 | 74 68 61 74 20 6c 6f 73 74 20 69 74 73 20 64 65 76 69 63 65 20 28 69 2e 65 2e 20 74 68 65 20 70 | that.lost.its.device.(i.e..the.p |
| 8420 | 6c 61 79 65 72 20 6f 6e 20 77 68 69 63 68 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 | layer.on.which.the.callback.is.i |
| 8440 | 6e 73 74 61 6c 6c 65 64 29 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b | nstalled)...........///.</remark |
| 8460 | 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 6f | s>..........///.<seealso.cref="o |
| 8480 | 6e 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 | nDeviceRegained"/>..........///. |
| 84a0 | 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 55 73 65 72 43 68 61 6e 67 65 2e 44 | <seealso.cref="InputUserChange.D |
| 84c0 | 65 76 69 63 65 4c 6f 73 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 65 76 65 | eviceLost"/>..........public.eve |
| 84e0 | 6e 74 20 41 63 74 69 6f 6e 3c 50 6c 61 79 65 72 49 6e 70 75 74 3e 20 6f 6e 44 65 76 69 63 65 4c | nt.Action<PlayerInput>.onDeviceL |
| 8500 | 6f 73 74 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 61 64 64 0d | ost..........{..............add. |
| 8520 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .............{.................. |
| 8540 | 69 66 20 28 76 61 6c 75 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | if.(value.==.null).............. |
| 8560 | 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 | ........throw.new.ArgumentNullEx |
| 8580 | 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 76 61 6c 75 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 | ception(nameof(value));......... |
| 85a0 | 20 20 20 20 20 20 20 20 20 6d 5f 44 65 76 69 63 65 4c 6f 73 74 43 61 6c 6c 62 61 63 6b 73 2e 41 | .........m_DeviceLostCallbacks.A |
| 85c0 | 70 70 65 6e 64 57 69 74 68 43 61 70 61 63 69 74 79 28 76 61 6c 75 65 2c 20 35 29 3b 0d 0a 20 20 | ppendWithCapacity(value,.5);.... |
| 85e0 | 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 72 65 6d 6f 76 65 0d | ..........}..............remove. |
| 8600 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .............{.................. |
| 8620 | 69 66 20 28 76 61 6c 75 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | if.(value.==.null).............. |
| 8640 | 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 | ........throw.new.ArgumentNullEx |
| 8660 | 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 76 61 6c 75 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 | ception(nameof(value));......... |
| 8680 | 20 20 20 20 20 20 20 20 20 76 61 72 20 69 6e 64 65 78 20 3d 20 6d 5f 44 65 76 69 63 65 4c 6f 73 | .........var.index.=.m_DeviceLos |
| 86a0 | 74 43 61 6c 6c 62 61 63 6b 73 2e 49 6e 64 65 78 4f 66 28 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 | tCallbacks.IndexOf(value);...... |
| 86c0 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 6e 64 65 78 20 21 3d 20 2d 31 29 0d 0a 20 20 | ............if.(index.!=.-1).... |
| 86e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 44 65 76 69 63 65 4c 6f 73 74 43 61 | ..................m_DeviceLostCa |
| 8700 | 6c 6c 62 61 63 6b 73 2e 52 65 6d 6f 76 65 41 74 57 69 74 68 43 61 70 61 63 69 74 79 28 69 6e 64 | llbacks.RemoveAtWithCapacity(ind |
| 8720 | 65 78 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a | ex);..............}..........}.. |
| 8740 | 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>......... |
| 8760 | 20 2f 2f 2f 20 49 66 20 3c 73 65 65 20 63 72 65 66 3d 22 6e 6f 74 69 66 69 63 61 74 69 6f 6e 42 | .///.If.<see.cref="notificationB |
| 8780 | 65 68 61 76 69 6f 72 22 2f 3e 20 69 73 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c 61 79 65 72 4e | ehavior"/>.is.<see.cref="PlayerN |
| 87a0 | 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 49 6e 76 6f 6b 65 43 53 68 61 72 70 45 76 65 6e 74 73 22 | otifications.InvokeCSharpEvents" |
| 87c0 | 2f 3e 2c 20 74 68 69 73 20 65 76 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 73 20 74 | />,.this.event..........///.is.t |
| 87e0 | 72 69 67 67 65 72 65 64 20 77 68 65 6e 20 74 68 65 20 70 6c 61 79 65 72 20 70 72 65 76 69 6f 75 | riggered.when.the.player.previou |
| 8800 | 73 6c 79 20 6c 6f 73 74 20 61 20 64 65 76 69 63 65 20 61 6e 64 20 68 61 73 20 6e 6f 77 20 72 65 | sly.lost.a.device.and.has.now.re |
| 8820 | 67 61 69 6e 65 64 20 69 74 20 6f 72 20 61 6e 20 65 71 75 69 76 61 6c 65 6e 74 20 64 65 76 69 63 | gained.it.or.an.equivalent.devic |
| 8840 | 65 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 20 20 20 | e...........///.</summary>...... |
| 8860 | 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 43 61 6c 6c 62 61 63 6b 73 20 74 68 61 74 20 67 65 | ....///.<value>Callbacks.that.ge |
| 8880 | 74 20 63 61 6c 6c 65 64 20 77 68 65 6e 20 74 68 65 20 70 6c 61 79 65 72 20 72 65 67 61 69 6e 73 | t.called.when.the.player.regains |
| 88a0 | 20 61 20 64 65 76 69 63 65 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 | .a.device.</value>..........///. |
| 88c0 | 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 66 20 3c 73 65 65 20 63 | <remarks>..........///.If.<see.c |
| 88e0 | 72 65 66 3d 22 6e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 22 2f 3e 20 69 73 20 | ref="notificationBehavior"/>.is. |
| 8900 | 6e 6f 74 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f | not.<see.cref="PlayerNotificatio |
| 8920 | 6e 73 2e 49 6e 76 6f 6b 65 43 53 68 61 72 70 45 76 65 6e 74 73 22 2f 3e 2c 20 74 68 65 20 76 61 | ns.InvokeCSharpEvents"/>,.the.va |
| 8940 | 6c 75 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f 66 20 74 68 69 73 20 70 72 6f 70 65 72 74 | lue..........///.of.this.propert |
| 8960 | 79 20 69 73 20 69 67 6e 6f 72 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 | y.is.ignored...........///...... |
| 8980 | 20 20 20 20 2f 2f 2f 20 54 68 65 20 61 72 67 75 6d 65 6e 74 20 69 73 20 74 68 65 20 70 6c 61 79 | ....///.The.argument.is.the.play |
| 89a0 | 65 72 20 74 68 61 74 20 72 65 67 61 69 6e 65 64 20 61 20 64 65 76 69 63 65 20 28 69 2e 65 2e 20 | er.that.regained.a.device.(i.e.. |
| 89c0 | 74 68 65 20 70 6c 61 79 65 72 20 6f 6e 20 77 68 69 63 68 20 74 68 65 20 63 61 6c 6c 62 61 63 6b | the.player.on.which.the.callback |
| 89e0 | 20 69 73 20 69 6e 73 74 61 6c 6c 65 64 29 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 | .is.installed)...........///.</r |
| 8a00 | 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 72 | emarks>..........///.<seealso.cr |
| 8a20 | 65 66 3d 22 6f 6e 44 65 76 69 63 65 4c 6f 73 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f | ef="onDeviceLost"/>........../// |
| 8a40 | 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 55 73 65 72 43 68 61 6e 67 65 2e | .<seealso.cref="InputUserChange. |
| 8a60 | 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 | DeviceRegained"/>..........publi |
| 8a80 | 63 20 65 76 65 6e 74 20 41 63 74 69 6f 6e 3c 50 6c 61 79 65 72 49 6e 70 75 74 3e 20 6f 6e 44 65 | c.event.Action<PlayerInput>.onDe |
| 8aa0 | 76 69 63 65 52 65 67 61 69 6e 65 64 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 | viceRegained..........{......... |
| 8ac0 | 20 20 20 20 20 61 64 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 | .....add..............{......... |
| 8ae0 | 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 | .........if.(value.==.null)..... |
| 8b00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d | .................throw.new.Argum |
| 8b20 | 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 76 61 6c 75 65 29 29 3b | entNullException(nameof(value)); |
| 8b40 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 44 65 76 69 63 65 52 65 67 61 69 6e | ..................m_DeviceRegain |
| 8b60 | 65 64 43 61 6c 6c 62 61 63 6b 73 2e 41 70 70 65 6e 64 57 69 74 68 43 61 70 61 63 69 74 79 28 76 | edCallbacks.AppendWithCapacity(v |
| 8b80 | 61 6c 75 65 2c 20 35 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 | alue,.5);..............}........ |
| 8ba0 | 20 20 20 20 20 20 72 65 6d 6f 76 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 | ......remove..............{..... |
| 8bc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 6c 75 65 20 3d 3d 20 6e 75 6c 6c 29 0d | .............if.(value.==.null). |
| 8be0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 | .....................throw.new.A |
| 8c00 | 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 76 61 6c 75 | rgumentNullException(nameof(valu |
| 8c20 | 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 6e 64 65 78 20 | e));..................var.index. |
| 8c40 | 3d 20 6d 5f 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 43 61 6c 6c 62 61 63 6b 73 2e 49 6e 64 65 | =.m_DeviceRegainedCallbacks.Inde |
| 8c60 | 78 4f 66 28 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 | xOf(value);..................if. |
| 8c80 | 28 69 6e 64 65 78 20 21 3d 20 2d 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | (index.!=.-1)................... |
| 8ca0 | 20 20 20 6d 5f 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 43 61 6c 6c 62 61 63 6b 73 2e 52 65 6d | ...m_DeviceRegainedCallbacks.Rem |
| 8cc0 | 6f 76 65 41 74 57 69 74 68 43 61 70 61 63 69 74 79 28 69 6e 64 65 78 29 3b 0d 0a 20 20 20 20 20 | oveAtWithCapacity(index);....... |
| 8ce0 | 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 2f | .......}..........}............/ |
| 8d00 | 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 49 66 20 3c 73 65 | //.<summary>..........///.If.<se |
| 8d20 | 65 20 63 72 65 66 3d 22 6e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 22 2f 3e 20 | e.cref="notificationBehavior"/>. |
| 8d40 | 69 73 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e | is.<see.cref="PlayerNotification |
| 8d60 | 73 2e 49 6e 76 6f 6b 65 43 53 68 61 72 70 45 76 65 6e 74 73 22 2f 3e 2c 20 74 68 69 73 20 65 76 | s.InvokeCSharpEvents"/>,.this.ev |
| 8d80 | 65 6e 74 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 73 20 74 72 69 67 67 65 72 65 64 20 77 68 | ent..........///.is.triggered.wh |
| 8da0 | 65 6e 20 74 68 65 20 63 6f 6e 74 72 6f 6c 73 20 75 73 65 64 20 62 79 20 74 68 65 20 70 6c 61 79 | en.the.controls.used.by.the.play |
| 8dc0 | 65 72 73 20 61 72 65 20 63 68 61 6e 67 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f | ers.are.changed...........///.</ |
| 8de0 | 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>. |
| 8e00 | 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 | .........///.The.callback.is.inv |
| 8e20 | 6f 6b 65 64 20 77 68 65 6e 20 74 68 65 20 73 65 74 20 6f 66 20 3c 73 65 65 20 63 72 65 66 3d 22 | oked.when.the.set.of.<see.cref=" |
| 8e40 | 64 65 76 69 63 65 73 22 2f 3e 20 75 73 65 64 20 62 79 20 74 68 65 20 70 6c 61 79 65 72 20 63 68 | devices"/>.used.by.the.player.ch |
| 8e60 | 61 6e 67 65 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 77 68 65 6e 20 74 68 65 20 70 6c 61 79 | ange,..........///.when.the.play |
| 8e80 | 65 72 20 73 77 69 74 63 68 65 73 20 74 6f 20 61 20 64 69 66 66 65 72 65 6e 74 20 63 6f 6e 74 72 | er.switches.to.a.different.contr |
| 8ea0 | 6f 6c 20 73 63 68 65 6d 65 20 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 63 75 72 72 65 6e | ol.scheme.(see.<see.cref="curren |
| 8ec0 | 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 22 2f 3e 29 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f | tControlScheme"/>),........../// |
| 8ee0 | 20 6f 72 20 77 68 65 6e 20 74 68 65 20 62 69 6e 64 69 6e 67 73 20 75 73 65 64 20 62 79 20 74 68 | .or.when.the.bindings.used.by.th |
| 8f00 | 65 20 70 6c 61 79 65 72 20 61 72 65 20 63 68 61 6e 67 65 64 20 28 65 2e 67 2e 20 77 68 65 6e 20 | e.player.are.changed.(e.g..when. |
| 8f20 | 72 65 62 69 6e 64 69 6e 67 20 74 68 65 6d 29 2e 20 41 6c 73 6f 2c 0d 0a 20 20 20 20 20 20 20 20 | rebinding.them)..Also,.......... |
| 8f40 | 2f 2f 2f 20 66 6f 72 20 3c 73 65 65 20 63 72 65 66 3d 22 4b 65 79 62 6f 61 72 64 22 2f 3e 20 64 | ///.for.<see.cref="Keyboard"/>.d |
| 8f60 | 65 76 69 63 65 73 2c 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 69 73 20 69 6e 76 6f 6b 65 64 20 | evices,.the.callback.is.invoked. |
| 8f80 | 77 68 65 6e 20 74 68 65 20 63 75 72 72 65 6e 74 6c 79 20 75 73 65 64 0d 0a 20 20 20 20 20 20 20 | when.the.currently.used......... |
| 8fa0 | 20 2f 2f 2f 20 6b 65 79 62 6f 61 72 64 20 6c 61 79 6f 75 74 20 28 73 65 65 20 3c 73 65 65 20 63 | .///.keyboard.layout.(see.<see.c |
| 8fc0 | 72 65 66 3d 22 4b 65 79 62 6f 61 72 64 2e 6b 65 79 62 6f 61 72 64 4c 61 79 6f 75 74 22 2f 3e 29 | ref="Keyboard.keyboardLayout"/>) |
| 8fe0 | 20 63 68 61 6e 67 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 | .changes...........///.</remarks |
| 9000 | 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 65 76 65 6e 74 20 41 63 74 69 6f 6e 3c 50 | >..........public.event.Action<P |
| 9020 | 6c 61 79 65 72 49 6e 70 75 74 3e 20 6f 6e 43 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 65 64 0d 0a 20 | layerInput>.onControlsChanged... |
| 9040 | 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 61 64 64 0d 0a 20 20 20 20 20 | .......{..............add....... |
| 9060 | 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 76 61 | .......{..................if.(va |
| 9080 | 6c 75 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | lue.==.null).................... |
| 90a0 | 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f | ..throw.new.ArgumentNullExceptio |
| 90c0 | 6e 28 6e 61 6d 65 6f 66 28 76 61 6c 75 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | n(nameof(value));............... |
| 90e0 | 20 20 20 6d 5f 43 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 65 64 43 61 6c 6c 62 61 63 6b 73 2e 41 70 | ...m_ControlsChangedCallbacks.Ap |
| 9100 | 70 65 6e 64 57 69 74 68 43 61 70 61 63 69 74 79 28 76 61 6c 75 65 2c 20 35 29 3b 0d 0a 20 20 20 | pendWithCapacity(value,.5);..... |
| 9120 | 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 6d 6f 76 65 0d 0a | .........}..............remove.. |
| 9140 | 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 |
| 9160 | 66 20 28 76 61 6c 75 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | f.(value.==.null)............... |
| 9180 | 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 | .......throw.new.ArgumentNullExc |
| 91a0 | 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 76 61 6c 75 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 | eption(nameof(value));.......... |
| 91c0 | 20 20 20 20 20 20 20 20 76 61 72 20 69 6e 64 65 78 20 3d 20 6d 5f 43 6f 6e 74 72 6f 6c 73 43 68 | ........var.index.=.m_ControlsCh |
| 91e0 | 61 6e 67 65 64 43 61 6c 6c 62 61 63 6b 73 2e 49 6e 64 65 78 4f 66 28 76 61 6c 75 65 29 3b 0d 0a | angedCallbacks.IndexOf(value);.. |
| 9200 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 6e 64 65 78 20 21 3d 20 2d 31 29 | ................if.(index.!=.-1) |
| 9220 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 6f 6e 74 72 6f 6c 73 | ......................m_Controls |
| 9240 | 43 68 61 6e 67 65 64 43 61 6c 6c 62 61 63 6b 73 2e 52 65 6d 6f 76 65 41 74 57 69 74 68 43 61 70 | ChangedCallbacks.RemoveAtWithCap |
| 9260 | 61 63 69 74 79 28 69 6e 64 65 78 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 | acity(index);..............}.... |
| 9280 | 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 54 4f 44 4f 3a 20 63 6c 61 | ......}............////TODO:.cla |
| 92a0 | 72 69 66 79 20 74 68 65 20 72 65 6c 61 74 69 6f 6e 73 68 69 70 20 74 6f 20 72 61 79 63 61 73 74 | rify.the.relationship.to.raycast |
| 92c0 | 69 6e 67 20 69 6e 20 74 68 65 20 55 49 20 69 6e 70 75 74 20 6d 6f 64 75 6c 65 0d 0a 20 20 20 20 | ing.in.the.UI.input.module...... |
| 92e0 | 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 4f | ....///.<summary>..........///.O |
| 9300 | 70 74 69 6f 6e 61 6c 20 63 61 6d 65 72 61 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 74 68 20 74 | ptional.camera.associated.with.t |
| 9320 | 68 65 20 70 6c 61 79 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 | he.player...........///.</summar |
| 9340 | 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 43 61 6d 65 72 61 20 73 70 | y>..........///.<value>Camera.sp |
| 9360 | 65 63 69 66 69 63 20 74 6f 20 74 68 65 20 70 6c 61 79 65 72 20 6f 72 20 3c 63 3e 6e 75 6c 6c 3c | ecific.to.the.player.or.<c>null< |
| 9380 | 2f 63 3e 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 | /c>.</value>..........///.<remar |
| 93a0 | 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 3c 63 3e 6e 75 6c 6c | ks>..........///.This.is.<c>null |
| 93c0 | 3c 2f 63 3e 20 62 79 20 64 65 66 61 75 6c 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 | </c>.by.default...........///... |
| 93e0 | 20 20 20 20 20 20 20 2f 2f 2f 20 41 73 73 6f 63 69 61 74 69 6e 67 20 61 20 63 61 6d 65 72 61 20 | .......///.Associating.a.camera. |
| 9400 | 77 69 74 68 20 61 20 70 6c 61 79 65 72 20 69 73 20 6e 65 63 65 73 73 61 72 79 20 6f 6e 6c 79 20 | with.a.player.is.necessary.only. |
| 9420 | 77 68 65 6e 20 75 73 69 6e 67 20 73 70 6c 69 74 2d 73 63 72 65 65 6e 20 28 73 65 65 20 3c 73 65 | when.using.split-screen.(see.<se |
| 9440 | 65 20 63 72 65 66 3d 22 50 6c 61 79 65 72 49 6e 70 75 74 4d 61 6e 61 67 65 72 2e 73 70 6c 69 74 | e.cref="PlayerInputManager.split |
| 9460 | 53 63 72 65 65 6e 22 2f 3e 29 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 | Screen"/>)...........///.</remar |
| 9480 | 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 0d 0a 20 20 20 20 20 20 20 20 23 69 66 | ks>..........public..........#if |
| 94a0 | 20 55 4e 49 54 59 5f 45 44 49 54 4f 52 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 63 61 6d 65 72 61 | .UNITY_EDITOR..........//.camera |
| 94c0 | 20 70 72 6f 70 65 72 74 79 20 69 73 20 64 65 70 72 65 63 61 74 65 64 20 61 6e 64 20 6f 6e 6c 79 | .property.is.deprecated.and.only |
| 94e0 | 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 45 64 69 74 6f 72 2e 0d 0a 20 20 20 20 20 20 20 20 6e | .available.in.Editor...........n |
| 9500 | 65 77 0d 0a 20 20 20 20 20 20 20 20 23 65 6e 64 69 66 0d 0a 20 20 20 20 20 20 20 20 43 61 6d 65 | ew..........#endif..........Came |
| 9520 | 72 61 20 63 61 6d 65 72 61 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 | ra.camera..........{............ |
| 9540 | 20 20 67 65 74 20 3d 3e 20 6d 5f 43 61 6d 65 72 61 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ..get.=>.m_Camera;.............. |
| 9560 | 73 65 74 20 3d 3e 20 6d 5f 43 61 6d 65 72 61 20 3d 20 76 61 6c 75 65 3b 0d 0a 20 20 20 20 20 20 | set.=>.m_Camera.=.value;........ |
| 9580 | 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 23 69 66 20 50 41 43 4b 41 47 45 5f 44 4f 43 53 5f | ..}............#if.PACKAGE_DOCS_ |
| 95a0 | 47 45 4e 45 52 41 54 49 4f 4e 20 7c 7c 20 55 4e 49 54 59 5f 49 4e 50 55 54 5f 53 59 53 54 45 4d | GENERATION.||.UNITY_INPUT_SYSTEM |
| 95c0 | 5f 45 4e 41 42 4c 45 5f 55 49 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 79 | _ENABLE_UI..........///.<summary |
| 95e0 | 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 55 49 20 49 6e 70 75 74 4d 6f 64 75 6c 65 20 74 68 | >..........///.UI.InputModule.th |
| 9600 | 61 74 20 73 68 6f 75 6c 64 20 68 61 76 65 20 69 74 27 73 20 69 6e 70 75 74 20 61 63 74 69 6f 6e | at.should.have.it's.input.action |
| 9620 | 73 20 73 79 6e 63 68 72 6f 6e 69 7a 65 64 20 74 6f 20 74 68 69 73 20 50 6c 61 79 65 72 49 6e 70 | s.synchronized.to.this.PlayerInp |
| 9640 | 75 74 27 73 20 61 63 74 69 6f 6e 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d | ut's.actions...........///.</sum |
| 9660 | 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 70 75 74 53 79 73 74 65 | mary>..........public.InputSyste |
| 9680 | 6d 55 49 49 6e 70 75 74 4d 6f 64 75 6c 65 20 75 69 49 6e 70 75 74 4d 6f 64 75 6c 65 0d 0a 20 20 | mUIInputModule.uiInputModule.... |
| 96a0 | 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 6d 5f 55 49 | ......{..............get.=>.m_UI |
| 96c0 | 49 6e 70 75 74 4d 6f 64 75 6c 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 0d 0a 20 | InputModule;..............set... |
| 96e0 | 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 |
| 9700 | 20 28 6d 5f 55 49 49 6e 70 75 74 4d 6f 64 75 6c 65 20 3d 3d 20 76 61 6c 75 65 29 0d 0a 20 20 20 | .(m_UIInputModule.==.value)..... |
| 9720 | 20 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 0d 0a 20 20 20 20 | .................return;........ |
| 9740 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 55 49 49 6e 70 75 74 4d 6f 64 75 6c 65 20 | ............if.(m_UIInputModule. |
| 9760 | 21 3d 20 6e 75 6c 6c 20 26 26 20 6d 5f 55 49 49 6e 70 75 74 4d 6f 64 75 6c 65 2e 61 63 74 69 6f | !=.null.&&.m_UIInputModule.actio |
| 9780 | 6e 73 41 73 73 65 74 20 3d 3d 20 6d 5f 41 63 74 69 6f 6e 73 29 0d 0a 20 20 20 20 20 20 20 20 20 | nsAsset.==.m_Actions)........... |
| 97a0 | 20 20 20 20 20 20 20 20 20 20 20 6d 5f 55 49 49 6e 70 75 74 4d 6f 64 75 6c 65 2e 61 63 74 69 6f | ...........m_UIInputModule.actio |
| 97c0 | 6e 73 41 73 73 65 74 20 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | nsAsset.=.null;................. |
| 97e0 | 20 20 20 6d 5f 55 49 49 6e 70 75 74 4d 6f 64 75 6c 65 20 3d 20 76 61 6c 75 65 3b 0d 0a 0d 0a 20 | ...m_UIInputModule.=.value;..... |
| 9800 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 55 49 49 6e 70 75 74 4d 6f 64 75 | ...............if.(m_UIInputModu |
| 9820 | 6c 65 20 21 3d 20 6e 75 6c 6c 20 26 26 20 6d 5f 41 63 74 69 6f 6e 73 20 21 3d 20 6e 75 6c 6c 29 | le.!=.null.&&.m_Actions.!=.null) |
| 9840 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 55 49 49 6e 70 75 74 4d | ......................m_UIInputM |
| 9860 | 6f 64 75 6c 65 2e 61 63 74 69 6f 6e 73 41 73 73 65 74 20 3d 20 6d 5f 41 63 74 69 6f 6e 73 3b 0d | odule.actionsAsset.=.m_Actions;. |
| 9880 | 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 20 20 20 20 20 | .............}..........}....... |
| 98a0 | 20 20 20 23 65 6e 64 69 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 72 | ...#endif............///.<summar |
| 98c0 | 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 69 6e 74 65 72 6e 61 6c 20 75 73 65 | y>..........///.The.internal.use |
| 98e0 | 72 20 74 69 65 64 20 74 6f 20 74 68 65 20 70 6c 61 79 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 2f | r.tied.to.the.player.........../ |
| 9900 | 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e | //.</summary>..........public.In |
| 9920 | 70 75 74 55 73 65 72 20 75 73 65 72 20 3d 3e 20 6d 5f 49 6e 70 75 74 55 73 65 72 3b 0d 0a 0d 0a | putUser.user.=>.m_InputUser;.... |
| 9940 | 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 20 2f | ........///.<summary>........../ |
| 9960 | 2f 2f 20 54 68 65 20 64 65 76 69 63 65 73 20 70 61 69 72 65 64 20 74 6f 20 74 68 65 20 70 6c 61 | //.The.devices.paired.to.the.pla |
| 9980 | 79 65 72 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 20 | yer...........///.</summary>.... |
| 99a0 | 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 4c 69 73 74 20 6f 66 20 64 65 76 69 63 65 73 | ......///.<value>List.of.devices |
| 99c0 | 20 70 61 69 72 65 64 20 74 6f 20 70 6c 61 79 65 72 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 | .paired.to.player.</value>...... |
| 99e0 | 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c | ....///.<remarks>..........///.< |
| 9a00 | 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 6f 20 | /remarks>..........///.<seealso. |
| 9a20 | 63 72 65 66 3d 22 49 6e 70 75 74 55 73 65 72 2e 70 61 69 72 65 64 44 65 76 69 63 65 73 22 2f 3e | cref="InputUser.pairedDevices"/> |
| 9a40 | 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 49 | ..........public.ReadOnlyArray<I |
| 9a60 | 6e 70 75 74 44 65 76 69 63 65 3e 20 64 65 76 69 63 65 73 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a | nputDevice>.devices..........{.. |
| 9a80 | 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 20 20 20 20 7b 0d 0a | ............get..............{.. |
| 9aa0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f 49 6e 70 75 74 55 73 65 72 | ................if.(!m_InputUser |
| 9ac0 | 2e 76 61 6c 69 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 | .valid)......................ret |
| 9ae0 | 75 72 6e 20 6e 65 77 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 49 6e 70 75 74 44 65 76 69 63 | urn.new.ReadOnlyArray<InputDevic |
| 9b00 | 65 3e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 | e>();....................return. |
| 9b20 | 6d 5f 49 6e 70 75 74 55 73 65 72 2e 70 61 69 72 65 64 44 65 76 69 63 65 73 3b 0d 0a 20 20 20 20 | m_InputUser.pairedDevices;...... |
| 9b40 | 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 | ........}..........}............ |
| 9b60 | 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 |
| 9b80 | 65 72 20 74 68 65 20 70 6c 61 79 65 72 20 69 73 20 6d 69 73 73 65 64 20 72 65 71 75 69 72 65 64 | er.the.player.is.missed.required |
| 9ba0 | 20 64 65 76 69 63 65 73 2e 20 54 68 69 73 20 6d 65 61 6e 73 20 74 68 61 74 20 74 68 65 20 70 6c | .devices..This.means.that.the.pl |
| 9bc0 | 61 79 65 72 27 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 6e 70 75 74 20 73 65 74 75 70 20 | ayer's..........///.input.setup. |
| 9be0 | 69 73 20 70 72 6f 62 61 62 6c 79 20 61 74 20 6c 65 61 73 74 20 70 61 72 74 69 61 6c 6c 79 20 6e | is.probably.at.least.partially.n |
| 9c00 | 6f 6e 2d 66 75 6e 63 74 69 6f 6e 61 6c 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 | on-functional...........///.</su |
| 9c20 | 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 72 75 65 20 | mmary>..........///.<value>True. |
| 9c40 | 69 66 20 74 68 65 20 70 6c 61 79 65 72 20 69 73 20 6d 69 73 73 69 6e 67 20 64 65 76 69 63 65 73 | if.the.player.is.missing.devices |
| 9c60 | 20 72 65 71 75 69 72 65 64 20 62 79 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 2e | .required.by.the.control.scheme. |
| 9c80 | 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 73 3e 0d | </value>..........///.<remarks>. |
| 9ca0 | 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 63 61 6e 20 68 61 70 70 65 6e 2c 20 66 6f | .........///.This.can.happen,.fo |
| 9cc0 | 72 20 65 78 61 6d 70 6c 65 2c 20 69 66 20 74 68 65 20 61 20 64 65 76 69 63 65 20 69 73 20 75 6e | r.example,.if.the.a.device.is.un |
| 9ce0 | 70 6c 75 67 67 65 64 20 64 75 72 69 6e 67 20 74 68 65 20 67 61 6d 65 2e 0d 0a 20 20 20 20 20 20 | plugged.during.the.game......... |
| 9d00 | 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 |
| 9d20 | 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 2e | eealso.cref="InputControlScheme. |
| 9d40 | 64 65 76 69 63 65 52 65 71 75 69 72 65 6d 65 6e 74 73 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f | deviceRequirements"/>........../ |
| 9d60 | 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 70 75 74 55 73 65 72 2e 68 61 73 4d | //.<seealso.cref="InputUser.hasM |
| 9d80 | 69 73 73 69 6e 67 52 65 71 75 69 72 65 64 44 65 76 69 63 65 73 22 2f 3e 0d 0a 20 20 20 20 20 20 | issingRequiredDevices"/>........ |
| 9da0 | 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 68 61 73 4d 69 73 73 69 6e 67 52 65 71 75 69 72 65 64 | ..public.bool.hasMissingRequired |
| 9dc0 | 44 65 76 69 63 65 73 20 3d 3e 20 75 73 65 72 2e 68 61 73 4d 69 73 73 69 6e 67 52 65 71 75 69 72 | Devices.=>.user.hasMissingRequir |
| 9de0 | 65 64 44 65 76 69 63 65 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 | edDevices;............///.<summa |
| 9e00 | 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4c 69 73 74 20 6f 66 20 61 6c 6c 20 70 6c 61 | ry>..........///.List.of.all.pla |
| 9e20 | 79 65 72 73 20 74 68 61 74 20 61 72 65 20 63 75 72 72 65 6e 74 6c 79 20 6a 6f 69 6e 65 64 2e 20 | yers.that.are.currently.joined.. |
| 9e40 | 53 6f 72 74 65 64 20 62 79 20 3c 73 65 65 20 63 72 65 66 3d 22 70 6c 61 79 65 72 49 6e 64 65 78 | Sorted.by.<see.cref="playerIndex |
| 9e60 | 22 2f 3e 20 69 6e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 6e 63 72 65 61 73 69 6e 67 20 6f | "/>.in..........///.increasing.o |
| 9e80 | 72 64 65 72 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 | rder...........///.</summary>... |
| 9ea0 | 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 4c 69 73 74 20 6f 66 20 61 63 74 69 76 65 | .......///.<value>List.of.active |
| 9ec0 | 20 50 6c 61 79 65 72 49 6e 70 75 74 73 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 20 20 20 20 | .PlayerInputs.</value>.......... |
| 9ee0 | 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 57 68 69 6c 65 | ///.<remarks>..........///.While |
| 9f00 | 20 74 68 65 20 6c 69 73 74 20 69 73 20 73 6f 72 74 65 64 20 62 79 20 3c 73 65 65 20 63 72 65 66 | .the.list.is.sorted.by.<see.cref |
| 9f20 | 3d 22 70 6c 61 79 65 72 49 6e 64 65 78 22 2f 3e 2c 20 6e 6f 74 65 20 74 68 61 74 20 74 68 69 73 | ="playerIndex"/>,.note.that.this |
| 9f40 | 20 64 6f 65 73 20 6e 6f 74 20 6d 65 61 6e 20 74 68 61 74 20 74 68 65 20 3c 73 65 65 20 63 72 65 | .does.not.mean.that.the.<see.cre |
| 9f60 | 66 3d 22 70 6c 61 79 65 72 49 6e 64 65 78 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6f | f="playerIndex"/>..........///.o |
| 9f80 | 66 20 61 20 70 6c 61 79 65 72 20 63 6f 72 72 65 73 70 6f 6e 64 73 20 74 6f 20 74 68 65 20 69 6e | f.a.player.corresponds.to.the.in |
| 9fa0 | 64 65 78 20 69 6e 20 74 68 69 73 20 6c 69 73 74 2e 20 49 66 2c 20 66 6f 72 20 65 78 61 6d 70 6c | dex.in.this.list..If,.for.exampl |
| 9fc0 | 65 2c 20 74 68 72 65 65 20 70 6c 61 79 65 72 73 20 6a 6f 69 6e 20 61 6e 64 20 74 68 65 6e 20 74 | e,.three.players.join.and.then.t |
| 9fe0 | 68 65 20 73 65 63 6f 6e 64 20 70 6c 61 79 65 72 20 6c 65 61 76 65 73 2c 0d 0a 20 20 20 20 20 20 | he.second.player.leaves,........ |
| a000 | 20 20 2f 2f 2f 20 74 68 65 20 6c 69 73 74 20 77 69 6c 6c 20 63 6f 6e 74 61 69 6e 20 6f 6e 65 20 | ..///.the.list.will.contain.one. |
| a020 | 70 6c 61 79 65 72 20 77 69 74 68 20 3c 73 65 65 20 63 72 65 66 3d 22 70 6c 61 79 65 72 49 6e 64 | player.with.<see.cref="playerInd |
| a040 | 65 78 22 2f 3e 20 30 20 66 6f 6c 6c 6f 77 65 64 20 62 79 20 6f 6e 65 20 70 6c 61 79 65 72 20 77 | ex"/>.0.followed.by.one.player.w |
| a060 | 69 74 68 20 3c 73 65 65 20 63 72 65 66 3d 22 70 6c 61 79 65 72 49 6e 64 65 78 22 2f 3e 20 32 2e | ith.<see.cref="playerIndex"/>.2. |
| a080 | 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 | ..........///.</remarks>........ |
| a0a0 | 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 50 6c 61 79 65 72 49 6e 70 75 74 | ..///.<seealso.cref="PlayerInput |
| a0c0 | 4d 61 6e 61 67 65 72 2e 4a 6f 69 6e 50 6c 61 79 65 72 28 69 6e 74 2c 69 6e 74 2c 73 74 72 69 6e | Manager.JoinPlayer(int,int,strin |
| a0e0 | 67 2c 49 6e 70 75 74 44 65 76 69 63 65 29 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c | g,InputDevice)"/>..........///.< |
| a100 | 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 49 6e 73 74 61 6e 74 69 61 74 65 28 47 61 6d 65 4f 62 | seealso.cref="Instantiate(GameOb |
| a120 | 6a 65 63 74 2c 69 6e 74 2c 73 74 72 69 6e 67 2c 69 6e 74 2c 49 6e 70 75 74 44 65 76 69 63 65 29 | ject,int,string,int,InputDevice) |
| a140 | 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 52 65 61 64 4f | "/>..........public.static.ReadO |
| a160 | 6e 6c 79 41 72 72 61 79 3c 50 6c 61 79 65 72 49 6e 70 75 74 3e 20 61 6c 6c 20 3d 3e 20 6e 65 77 | nlyArray<PlayerInput>.all.=>.new |
| a180 | 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 50 6c 61 79 65 72 49 6e 70 75 74 3e 28 73 5f 41 6c | .ReadOnlyArray<PlayerInput>(s_Al |
| a1a0 | 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 2c 20 30 2c 20 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c | lActivePlayers,.0,.s_AllActivePl |
| a1c0 | 61 79 65 72 73 43 6f 75 6e 74 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d | ayersCount);............///.<sum |
| a1e0 | 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 57 68 65 74 68 65 72 20 50 6c 61 79 65 | mary>..........///.Whether.Playe |
| a200 | 72 49 6e 70 75 74 20 6f 70 65 72 61 74 65 73 20 69 6e 20 73 69 6e 67 6c 65 2d 70 6c 61 79 65 72 | rInput.operates.in.single-player |
| a220 | 20 6d 6f 64 65 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 | .mode...........///.</summary>.. |
| a240 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 49 66 20 74 72 75 65 2c 20 74 68 65 72 | ........///.<value>If.true,.ther |
| a260 | 65 20 69 73 20 61 74 20 6d 6f 73 74 20 61 20 73 69 6e 67 6c 65 20 50 6c 61 79 65 72 49 6e 70 75 | e.is.at.most.a.single.PlayerInpu |
| a280 | 74 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 73 | t.</value>..........///.<remarks |
| a2a0 | 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 69 6e 67 6c 65 2d 70 6c 61 79 65 72 20 6d 6f 64 | >..........///.Single-player.mod |
| a2c0 | 65 20 69 73 20 61 63 74 69 76 65 20 77 68 69 6c 65 20 74 68 65 72 65 20 69 73 20 61 74 20 6d 6f | e.is.active.while.there.is.at.mo |
| a2e0 | 73 74 20 6f 6e 65 20 50 6c 61 79 65 72 49 6e 70 75 74 20 28 74 68 65 72 65 20 63 61 6e 20 61 6c | st.one.PlayerInput.(there.can.al |
| a300 | 73 6f 20 62 65 20 6e 6f 6e 65 29 20 61 6e 64 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 77 68 69 | so.be.none).and..........///.whi |
| a320 | 6c 65 20 6a 6f 69 6e 69 6e 67 20 69 73 20 6e 6f 74 20 65 6e 61 62 6c 65 64 20 69 6e 20 3c 73 65 | le.joining.is.not.enabled.in.<se |
| a340 | 65 20 63 72 65 66 3d 22 50 6c 61 79 65 72 49 6e 70 75 74 4d 61 6e 61 67 65 72 22 2f 3e 20 28 69 | e.cref="PlayerInputManager"/>.(i |
| a360 | 66 20 6f 6e 65 20 65 78 69 73 74 73 29 2e 20 53 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c | f.one.exists)..See.<see.cref="Pl |
| a380 | 61 79 65 72 49 6e 70 75 74 4d 61 6e 61 67 65 72 2e 6a 6f 69 6e 69 6e 67 45 6e 61 62 6c 65 64 22 | ayerInputManager.joiningEnabled" |
| a3a0 | 2f 3e 2e 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 41 75 | />...........///..........///.Au |
| a3c0 | 74 6f 6d 61 74 69 63 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 73 77 69 74 63 68 69 6e 67 | tomatic.control.scheme.switching |
| a3e0 | 20 28 69 66 20 65 6e 61 62 6c 65 64 29 20 69 73 20 70 72 65 64 69 63 61 74 65 64 20 6f 6e 20 73 | .(if.enabled).is.predicated.on.s |
| a400 | 69 6e 67 6c 65 2d 70 6c 61 79 65 72 20 6d 6f 64 65 20 62 65 69 6e 67 20 61 63 74 69 76 65 2e 0d | ingle-player.mode.being.active.. |
| a420 | 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 | .........///.</remarks>......... |
| a440 | 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 6e 65 76 65 72 41 75 74 6f 53 77 69 | .///.<seealso.cref="neverAutoSwi |
| a460 | 74 63 68 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 73 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 | tchControlSchemes"/>..........pu |
| a480 | 62 6c 69 63 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 69 73 53 69 6e 67 6c 65 50 6c 61 79 65 72 20 | blic.static.bool.isSinglePlayer. |
| a4a0 | 3d 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 | =>..............s_AllActivePlaye |
| a4c0 | 72 73 43 6f 75 6e 74 20 3c 3d 20 31 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 28 50 6c | rsCount.<=.1.&&..............(Pl |
| a4e0 | 61 79 65 72 49 6e 70 75 74 4d 61 6e 61 67 65 72 2e 69 6e 73 74 61 6e 63 65 20 3d 3d 20 6e 75 6c | ayerInputManager.instance.==.nul |
| a500 | 6c 20 7c 7c 20 21 50 6c 61 79 65 72 49 6e 70 75 74 4d 61 6e 61 67 65 72 2e 69 6e 73 74 61 6e 63 | l.||.!PlayerInputManager.instanc |
| a520 | 65 2e 6a 6f 69 6e 69 6e 67 45 6e 61 62 6c 65 64 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f | e.joiningEnabled);............// |
| a540 | 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 45 6e 61 62 6c 65 20 | /.<summary>..........///.Enable. |
| a560 | 69 6e 70 75 74 20 6f 6e 20 74 68 65 20 70 6c 61 79 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f | input.on.the.player...........// |
| a580 | 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 72 65 6d 61 72 | /.</summary>..........///.<remar |
| a5a0 | 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 6e 70 75 74 20 77 69 6c 6c 20 61 75 74 6f | ks>..........///.Input.will.auto |
| a5c0 | 6d 61 74 69 63 61 6c 6c 79 20 62 65 20 61 63 74 69 76 61 74 65 64 20 77 68 65 6e 20 74 68 65 20 | matically.be.activated.when.the. |
| a5e0 | 50 6c 61 79 65 72 49 6e 70 75 74 20 63 6f 6d 70 6f 6e 65 6e 74 20 69 73 20 65 6e 61 62 6c 65 64 | PlayerInput.component.is.enabled |
| a600 | 2e 20 48 6f 77 65 76 65 72 2c 20 74 68 69 73 20 6d 65 74 68 6f 64 0d 0a 20 20 20 20 20 20 20 20 | ..However,.this.method.......... |
| a620 | 2f 2f 2f 20 63 61 6e 20 62 65 20 63 61 6c 6c 65 64 20 74 6f 20 72 65 61 63 74 69 76 61 74 65 20 | ///.can.be.called.to.reactivate. |
| a640 | 69 6e 70 75 74 20 61 66 74 65 72 20 64 65 61 63 74 69 76 61 74 69 6e 67 20 69 74 20 77 69 74 68 | input.after.deactivating.it.with |
| a660 | 20 3c 73 65 65 20 63 72 65 66 3d 22 44 65 61 63 74 69 76 61 74 65 49 6e 70 75 74 22 2f 3e 2e 0d | .<see.cref="DeactivateInput"/>.. |
| a680 | 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 74 | .........///..........///.Note.t |
| a6a0 | 68 61 74 20 61 63 74 69 76 61 74 69 6e 67 20 69 6e 70 75 74 20 77 69 6c 6c 20 61 63 74 69 76 61 | hat.activating.input.will.activa |
| a6c0 | 74 65 20 74 68 65 20 63 75 72 72 65 6e 74 20 61 63 74 69 6f 6e 20 6d 61 70 20 6f 6e 6c 79 20 28 | te.the.current.action.map.only.( |
| a6e0 | 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 63 75 72 72 65 6e 74 41 63 74 69 6f 6e 4d 61 70 22 | see.<see.cref="currentActionMap" |
| a700 | 2f 3e 29 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 | />)...........///.</remarks>.... |
| a720 | 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 66 3d 22 69 6e 70 75 74 49 73 41 63 74 69 | ......///.<see.cref="inputIsActi |
| a740 | 76 65 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 | ve"/>..........///.<seealso.cref |
| a760 | 3d 22 44 65 61 63 74 69 76 61 74 65 49 6e 70 75 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 | ="DeactivateInput"/>..........pu |
| a780 | 62 6c 69 63 20 76 6f 69 64 20 41 63 74 69 76 61 74 65 49 6e 70 75 74 28 29 0d 0a 20 20 20 20 20 | blic.void.ActivateInput()....... |
| a7a0 | 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6e 70 75 74 41 63 74 69 76 65 20 | ...{..............m_InputActive. |
| a7c0 | 3d 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 77 65 20 | =.true;................//.If.we. |
| a7e0 | 68 61 76 65 20 6e 6f 20 63 75 72 72 65 6e 74 20 61 63 74 69 6f 6e 20 6d 61 70 20 62 75 74 20 74 | have.no.current.action.map.but.t |
| a800 | 68 65 72 65 27 73 20 61 20 64 65 66 61 75 6c 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f | here's.a.default..............// |
| a820 | 20 61 63 74 69 6f 6e 20 6d 61 70 2c 20 6d 61 6b 65 20 69 74 20 63 75 72 72 65 6e 74 2e 0d 0a 20 | .action.map,.make.it.current.... |
| a840 | 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 43 75 72 72 65 6e 74 41 63 74 69 6f 6e 4d 61 | ...........if.(m_CurrentActionMa |
| a860 | 70 20 3d 3d 20 6e 75 6c 6c 20 26 26 20 6d 5f 41 63 74 69 6f 6e 73 20 21 3d 20 6e 75 6c 6c 20 26 | p.==.null.&&.m_Actions.!=.null.& |
| a880 | 26 20 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 6d 5f 44 65 66 61 75 6c | &.!string.IsNullOrEmpty(m_Defaul |
| a8a0 | 74 41 63 74 69 6f 6e 4d 61 70 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 77 | tActionMap))..................Sw |
| a8c0 | 69 74 63 68 43 75 72 72 65 6e 74 41 63 74 69 6f 6e 4d 61 70 28 6d 5f 44 65 66 61 75 6c 74 41 63 | itchCurrentActionMap(m_DefaultAc |
| a8e0 | 74 69 6f 6e 4d 61 70 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 | tionMap);..............else..... |
| a900 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 75 72 72 65 6e 74 41 63 74 69 6f 6e 4d 61 70 3f | .............m_CurrentActionMap? |
| a920 | 2e 45 6e 61 62 6c 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 | .Enable();..........}........... |
| a940 | 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 44 69 73 61 | .///.<summary>..........///.Disa |
| a960 | 62 6c 65 20 69 6e 70 75 74 20 6f 6e 20 74 68 65 20 70 6c 61 79 65 72 2e 0d 0a 20 20 20 20 20 20 | ble.input.on.the.player......... |
| a980 | 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 72 | ..///.</summary>..........///.<r |
| a9a0 | 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 6e 70 75 74 20 69 73 20 61 75 | emarks>..........///.Input.is.au |
| a9c0 | 74 6f 6d 61 74 69 63 61 6c 6c 79 20 61 63 74 69 76 61 74 65 64 20 77 68 65 6e 20 74 68 65 20 50 | tomatically.activated.when.the.P |
| a9e0 | 6c 61 79 65 72 49 6e 70 75 74 20 63 6f 6d 70 6f 6e 65 6e 74 20 69 73 20 65 6e 61 62 6c 65 64 2e | layerInput.component.is.enabled. |
| aa00 | 20 54 68 69 73 20 6d 65 74 68 6f 64 20 63 61 6e 20 62 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f | .This.method.can.be........../// |
| aa20 | 20 75 73 65 64 20 74 6f 20 64 65 61 63 74 69 76 61 74 65 20 69 6e 70 75 74 20 6d 61 6e 75 61 6c | .used.to.deactivate.input.manual |
| aa40 | 6c 79 2e 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 | ly...........///..........///.No |
| aa60 | 74 65 20 74 68 61 74 20 61 63 74 69 76 61 74 69 6e 67 20 69 6e 70 75 74 20 77 69 6c 6c 20 64 65 | te.that.activating.input.will.de |
| aa80 | 61 63 74 69 76 61 74 65 20 74 68 65 20 63 75 72 72 65 6e 74 20 61 63 74 69 6f 6e 20 6d 61 70 20 | activate.the.current.action.map. |
| aaa0 | 6f 6e 6c 79 20 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 63 75 72 72 65 6e 74 41 63 74 69 | only.(see.<see.cref="currentActi |
| aac0 | 6f 6e 4d 61 70 22 2f 3e 29 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b | onMap"/>)...........///.</remark |
| aae0 | 73 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 41 63 74 69 76 | s>..........///.<see.cref="Activ |
| ab00 | 61 74 65 49 6e 70 75 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 | ateInput"/>..........///.<see.cr |
| ab20 | 65 66 3d 22 69 6e 70 75 74 49 73 41 63 74 69 76 65 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 | ef="inputIsActive"/>..........pu |
| ab40 | 62 6c 69 63 20 76 6f 69 64 20 44 65 61 63 74 69 76 61 74 65 49 6e 70 75 74 28 29 0d 0a 20 20 20 | blic.void.DeactivateInput()..... |
| ab60 | 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 43 75 72 72 65 6e 74 41 63 74 | .....{..............m_CurrentAct |
| ab80 | 69 6f 6e 4d 61 70 3f 2e 44 69 73 61 62 6c 65 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 | ionMap?.Disable();.............. |
| aba0 | 20 20 6d 5f 49 6e 70 75 74 41 63 74 69 76 65 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 | ..m_InputActive.=.false;........ |
| abc0 | 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5b 4f 62 73 6f 6c 65 74 65 28 22 55 73 65 20 44 65 | ..}............[Obsolete("Use.De |
| abe0 | 61 63 74 69 76 61 74 65 49 6e 70 75 74 20 69 6e 73 74 65 61 64 2e 22 29 5d 0d 0a 20 20 20 20 20 | activateInput.instead.")]....... |
| ac00 | 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 50 61 73 73 69 76 61 74 65 49 6e 70 75 74 28 29 0d | ...public.void.PassivateInput(). |
| ac20 | 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 65 61 63 74 69 76 61 | .........{..............Deactiva |
| ac40 | 74 65 49 6e 70 75 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 | teInput();..........}........... |
| ac60 | 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 53 77 69 74 63 68 43 75 72 72 65 6e 74 43 6f 6e 74 72 6f | .public.bool.SwitchCurrentContro |
| ac80 | 6c 53 63 68 65 6d 65 28 70 61 72 61 6d 73 20 49 6e 70 75 74 44 65 76 69 63 65 5b 5d 20 64 65 76 | lScheme(params.InputDevice[].dev |
| aca0 | 69 63 65 73 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 69 66 | ices)..........{..............if |
| acc0 | 20 28 64 65 76 69 63 65 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .(devices.==.null).............. |
| ace0 | 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 | ....throw.new.ArgumentNullExcept |
| ad00 | 69 6f 6e 28 6e 61 6d 65 6f 66 28 64 65 76 69 63 65 73 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 | ion(nameof(devices));........... |
| ad20 | 20 20 20 69 66 20 28 61 63 74 69 6f 6e 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 | ...if.(actions.==.null)......... |
| ad40 | 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 49 6e 76 61 6c 69 64 4f 70 65 72 61 74 | .........throw.new.InvalidOperat |
| ad60 | 69 6f 6e 45 78 63 65 70 74 69 6f 6e 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ionException(................... |
| ad80 | 20 20 20 22 4d 75 73 74 20 73 65 74 20 61 63 74 69 6f 6e 73 20 6f 6e 20 50 6c 61 79 65 72 49 6e | ..."Must.set.actions.on.PlayerIn |
| ada0 | 70 75 74 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 62 65 20 61 62 6c 65 20 74 6f 20 73 77 69 74 63 | put.in.order.to.be.able.to.switc |
| adc0 | 68 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | h.control.schemes");............ |
| ade0 | 20 20 20 20 76 61 72 20 73 63 68 65 6d 65 20 3d 20 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 53 63 68 | ....var.scheme.=.InputControlSch |
| ae00 | 65 6d 65 2e 46 69 6e 64 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 46 6f 72 44 65 76 69 63 65 73 28 | eme.FindControlSchemeForDevices( |
| ae20 | 64 65 76 69 63 65 73 2c 20 61 63 74 69 6f 6e 73 2e 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 73 29 | devices,.actions.controlSchemes) |
| ae40 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 63 68 65 6d 65 20 3d 3d 20 6e 75 6c | ;..............if.(scheme.==.nul |
| ae60 | 6c 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 73 65 | l)..................return.false |
| ae80 | 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 77 69 74 63 68 43 75 72 72 65 6e 74 43 6f | ;................SwitchCurrentCo |
| aea0 | 6e 74 72 6f 6c 53 63 68 65 6d 65 28 73 63 68 65 6d 65 2e 56 61 6c 75 65 2e 6e 61 6d 65 2c 20 64 | ntrolScheme(scheme.Value.name,.d |
| aec0 | 65 76 69 63 65 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 | evices);..............return.tru |
| aee0 | 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 52 45 56 | e;..........}............////REV |
| af00 | 49 45 57 3a 20 74 68 65 73 65 20 73 68 6f 75 6c 64 20 6a 75 73 74 20 62 65 20 53 77 69 74 63 68 | IEW:.these.should.just.be.Switch |
| af20 | 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 | ControlScheme............public. |
| af40 | 76 6f 69 64 20 53 77 69 74 63 68 43 75 72 72 65 6e 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 28 | void.SwitchCurrentControlScheme( |
| af60 | 73 74 72 69 6e 67 20 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 2c 20 70 61 72 61 6d 73 20 49 6e 70 | string.controlScheme,.params.Inp |
| af80 | 75 74 44 65 76 69 63 65 5b 5d 20 64 65 76 69 63 65 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a | utDevice[].devices)..........{.. |
| afa0 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 | ............if.(string.IsNullOrE |
| afc0 | 6d 70 74 79 28 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | mpty(controlScheme))............ |
| afe0 | 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 | ......throw.new.ArgumentNullExce |
| b000 | 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 29 29 3b 0d 0a 20 | ption(nameof(controlScheme));... |
| b020 | 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 64 65 76 69 63 65 73 20 3d 3d 20 6e 75 6c 6c 29 0d | ...........if.(devices.==.null). |
| b040 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d | .................throw.new.Argum |
| b060 | 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f 66 28 64 65 76 69 63 65 73 29 | entNullException(nameof(devices) |
| b080 | 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 75 73 69 6e 67 20 28 49 6e 70 75 74 41 63 | );................using.(InputAc |
| b0a0 | 74 69 6f 6e 52 65 62 69 6e 64 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 2e 44 65 66 65 72 42 69 6e | tionRebindingExtensions.DeferBin |
| b0c0 | 64 69 6e 67 52 65 73 6f 6c 75 74 69 6f 6e 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b | dingResolution())..............{ |
| b0e0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 73 65 72 2e 55 6e 70 61 69 72 44 65 76 | ..................user.UnpairDev |
| b100 | 69 63 65 73 28 29 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 | ices();..................for.(va |
| b120 | 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 64 65 76 69 63 65 73 2e 4c 65 6e 67 74 68 3b 20 2b 2b 69 | r.i.=.0;.i.<.devices.Length;.++i |
| b140 | 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 55 73 65 72 | )......................InputUser |
| b160 | 2e 50 65 72 66 6f 72 6d 50 61 69 72 69 6e 67 57 69 74 68 44 65 76 69 63 65 28 64 65 76 69 63 65 | .PerformPairingWithDevice(device |
| b180 | 73 5b 69 5d 2c 20 75 73 65 72 3a 20 75 73 65 72 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 | s[i],.user:.user);.............. |
| b1a0 | 20 20 20 20 20 20 75 73 65 72 2e 41 63 74 69 76 61 74 65 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 | ......user.ActivateControlScheme |
| b1c0 | 28 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d | (controlScheme);..............}. |
| b1e0 | 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 | .........}............public.voi |
| b200 | 64 20 53 77 69 74 63 68 43 75 72 72 65 6e 74 41 63 74 69 6f 6e 4d 61 70 28 73 74 72 69 6e 67 20 | d.SwitchCurrentActionMap(string. |
| b220 | 6d 61 70 4e 61 6d 65 4f 72 49 64 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 | mapNameOrId)..........{......... |
| b240 | 20 20 20 20 20 2f 2f 20 4d 75 73 74 20 62 65 20 65 6e 61 62 6c 65 64 2e 0d 0a 20 20 20 20 20 20 | .....//.Must.be.enabled......... |
| b260 | 20 20 20 20 20 20 69 66 20 28 21 6d 5f 45 6e 61 62 6c 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 | ......if.(!m_Enabled)........... |
| b280 | 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 45 | ...{..................Debug.LogE |
| b2a0 | 72 72 6f 72 28 24 22 43 61 6e 6e 6f 74 20 73 77 69 74 63 68 20 74 6f 20 61 63 74 69 6f 6e 73 20 | rror($"Cannot.switch.to.actions. |
| b2c0 | 27 7b 6d 61 70 4e 61 6d 65 4f 72 49 64 7d 27 3b 20 69 6e 70 75 74 20 69 73 20 6e 6f 74 20 65 6e | '{mapNameOrId}';.input.is.not.en |
| b2e0 | 61 62 6c 65 64 22 2c 20 74 68 69 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | abled",.this);.................. |
| b300 | 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 | return;..............}.......... |
| b320 | 20 20 20 20 20 20 2f 2f 20 4d 75 73 74 20 68 61 76 65 20 61 63 74 69 6f 6e 73 2e 0d 0a 20 20 20 | ......//.Must.have.actions...... |
| b340 | 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 63 74 69 6f 6e 73 20 3d 3d 20 6e 75 6c 6c 29 0d | .........if.(m_Actions.==.null). |
| b360 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .............{.................. |
| b380 | 44 65 62 75 67 2e 4c 6f 67 45 72 72 6f 72 28 24 22 43 61 6e 6e 6f 74 20 73 77 69 74 63 68 20 74 | Debug.LogError($"Cannot.switch.t |
| b3a0 | 6f 20 61 63 74 69 6f 6e 73 20 27 7b 6d 61 70 4e 61 6d 65 4f 72 49 64 7d 27 3b 20 6e 6f 20 61 63 | o.actions.'{mapNameOrId}';.no.ac |
| b3c0 | 74 69 6f 6e 73 20 73 65 74 20 6f 6e 20 50 6c 61 79 65 72 49 6e 70 75 74 22 2c 20 74 68 69 73 29 | tions.set.on.PlayerInput",.this) |
| b3e0 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 | ;..................return;...... |
| b400 | 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 2f 2f 20 4d 75 73 74 | ........}................//.Must |
| b420 | 20 68 61 76 65 20 6d 61 70 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 61 63 74 69 | .have.map...............var.acti |
| b440 | 6f 6e 4d 61 70 20 3d 20 6d 5f 41 63 74 69 6f 6e 73 2e 46 69 6e 64 41 63 74 69 6f 6e 4d 61 70 28 | onMap.=.m_Actions.FindActionMap( |
| b460 | 6d 61 70 4e 61 6d 65 4f 72 49 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 | mapNameOrId);..............if.(a |
| b480 | 63 74 69 6f 6e 4d 61 70 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b | ctionMap.==.null)..............{ |
| b4a0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 45 72 72 6f 72 | ..................Debug.LogError |
| b4c0 | 28 24 22 43 61 6e 6e 6f 74 20 66 69 6e 64 20 61 63 74 69 6f 6e 20 6d 61 70 20 27 7b 6d 61 70 4e | ($"Cannot.find.action.map.'{mapN |
| b4e0 | 61 6d 65 4f 72 49 64 7d 27 20 69 6e 20 61 63 74 69 6f 6e 73 20 27 7b 6d 5f 41 63 74 69 6f 6e 73 | ameOrId}'.in.actions.'{m_Actions |
| b500 | 7d 27 22 2c 20 74 68 69 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 | }'",.this);..................ret |
| b520 | 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 | urn;..............}............. |
| b540 | 20 20 20 63 75 72 72 65 6e 74 41 63 74 69 6f 6e 4d 61 70 20 3d 20 61 63 74 69 6f 6e 4d 61 70 3b | ...currentActionMap.=.actionMap; |
| b560 | 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 73 75 6d 6d | ..........}............///.<summ |
| b580 | 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 74 68 65 20 4e 74 68 | ary>..........///.Return.the.Nth |
| b5a0 | 20 70 6c 61 79 65 72 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 | .player...........///.</summary> |
| b5c0 | 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 70 6c 61 79 65 | ..........///.<param.name="playe |
| b5e0 | 72 49 6e 64 65 78 22 3e 49 6e 64 65 78 20 6f 66 20 74 68 65 20 70 6c 61 79 65 72 20 74 6f 20 72 | rIndex">Index.of.the.player.to.r |
| b600 | 65 74 75 72 6e 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 | eturn.</param>..........///.<ret |
| b620 | 75 72 6e 73 3e 54 68 65 20 70 6c 61 79 65 72 20 77 69 74 68 20 74 68 65 20 67 69 76 65 6e 20 70 | urns>The.player.with.the.given.p |
| b640 | 6c 61 79 65 72 20 69 6e 64 65 78 20 6f 72 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 20 69 66 20 6e 6f | layer.index.or.<c>null</c>.if.no |
| b660 | 20 73 75 63 68 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 70 6c 61 79 65 72 20 65 78 69 73 74 73 | .such..........///.player.exists |
| b680 | 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 | .</returns>..........///.<seeals |
| b6a0 | 6f 20 63 72 65 66 3d 22 50 6c 61 79 65 72 49 6e 70 75 74 2e 70 6c 61 79 65 72 49 6e 64 65 78 22 | o.cref="PlayerInput.playerIndex" |
| b6c0 | 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 50 6c 61 79 65 72 | />..........public.static.Player |
| b6e0 | 49 6e 70 75 74 20 47 65 74 50 6c 61 79 65 72 42 79 49 6e 64 65 78 28 69 6e 74 20 70 6c 61 79 65 | Input.GetPlayerByIndex(int.playe |
| b700 | 72 49 6e 64 65 78 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 | rIndex)..........{.............. |
| b720 | 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 73 5f 41 6c 6c 41 63 74 69 76 65 50 | for.(var.i.=.0;.i.<.s_AllActiveP |
| b740 | 6c 61 79 65 72 73 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | layersCount;.++i)............... |
| b760 | 20 20 20 69 66 20 28 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 5b 69 5d 2e 70 6c 61 | ...if.(s_AllActivePlayers[i].pla |
| b780 | 79 65 72 49 6e 64 65 78 20 3d 3d 20 70 6c 61 79 65 72 49 6e 64 65 78 29 0d 0a 20 20 20 20 20 20 | yerIndex.==.playerIndex)........ |
| b7a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 5f 41 6c 6c 41 63 74 69 76 65 | ..............return.s_AllActive |
| b7c0 | 50 6c 61 79 65 72 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 | Players[i];..............return. |
| b7e0 | 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 | null;..........}............///. |
| b800 | 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 46 69 6e 64 20 74 68 65 20 | <summary>..........///.Find.the. |
| b820 | 66 69 72 73 74 20 50 6c 61 79 65 72 49 6e 70 75 74 20 77 68 6f 20 74 68 65 20 67 69 76 65 6e 20 | first.PlayerInput.who.the.given. |
| b840 | 64 65 76 69 63 65 20 69 73 20 70 61 69 72 65 64 20 74 6f 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f | device.is.paired.to...........// |
| b860 | 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d | /.</summary>..........///.<param |
| b880 | 20 6e 61 6d 65 3d 22 64 65 76 69 63 65 22 3e 41 6e 20 69 6e 70 75 74 20 64 65 76 69 63 65 2e 3c | .name="device">An.input.device.< |
| b8a0 | 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 | /param>..........///.<returns>Th |
| b8c0 | 65 20 70 6c 61 79 65 72 20 77 68 6f 20 69 73 20 70 61 69 72 65 64 20 74 6f 20 74 68 65 20 67 69 | e.player.who.is.paired.to.the.gi |
| b8e0 | 76 65 6e 20 64 65 76 69 63 65 20 6f 72 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 20 69 66 20 6e 6f 0d | ven.device.or.<c>null</c>.if.no. |
| b900 | 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 50 6c 61 79 65 72 49 6e 70 75 74 20 63 75 72 72 65 6e 74 | .........///.PlayerInput.current |
| b920 | 6c 79 20 69 73 20 70 61 69 72 65 64 20 74 6f 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 | ly.is.paired.to.<paramref.name=" |
| b940 | 64 65 76 69 63 65 22 2f 3e 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f | device"/>.</returns>..........// |
| b960 | 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 | /.<exception.cref="ArgumentNullE |
| b980 | 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 64 65 76 69 63 65 | xception"><paramref.name="device |
| b9a0 | 22 2f 3e 20 69 73 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e 0d | "/>.is.<c>null</c>.</exception>. |
| b9c0 | 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 20 | .........///.<remarks>.......... |
| b9e0 | 2f 2f 2f 20 3c 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 63 6f 64 65 | ///.<example>..........///.<code |
| ba00 | 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 2f 2f 20 46 69 6e 64 20 74 68 65 20 70 6c 61 79 65 | >..........///.//.Find.the.playe |
| ba20 | 72 20 70 61 69 72 65 64 20 74 6f 20 66 69 72 73 74 20 67 61 6d 65 70 61 64 2e 0d 0a 20 20 20 20 | r.paired.to.first.gamepad....... |
| ba40 | 20 20 20 20 2f 2f 2f 20 76 61 72 20 70 6c 61 79 65 72 20 3d 20 50 6c 61 79 65 72 49 6e 70 75 74 | ....///.var.player.=.PlayerInput |
| ba60 | 2e 46 69 6e 64 46 69 72 73 74 50 61 69 72 65 64 54 6f 44 65 76 69 63 65 28 47 61 6d 65 70 61 64 | .FindFirstPairedToDevice(Gamepad |
| ba80 | 2e 61 6c 6c 5b 30 5d 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 63 6f 64 65 3e 0d 0a | .all[0]);..........///.</code>.. |
| baa0 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 65 78 61 6d 70 6c 65 3e 0d 0a 20 20 20 20 20 20 20 20 | ........///.</example>.......... |
| bac0 | 2f 2f 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 73 | ///.</remarks>..........public.s |
| bae0 | 74 61 74 69 63 20 50 6c 61 79 65 72 49 6e 70 75 74 20 46 69 6e 64 46 69 72 73 74 50 61 69 72 65 | tatic.PlayerInput.FindFirstPaire |
| bb00 | 64 54 6f 44 65 76 69 63 65 28 49 6e 70 75 74 44 65 76 69 63 65 20 64 65 76 69 63 65 29 0d 0a 20 | dToDevice(InputDevice.device)... |
| bb20 | 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 64 65 76 69 63 65 | .......{..............if.(device |
| bb40 | 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 | .==.null)..................throw |
| bb60 | 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 6f | .new.ArgumentNullException(nameo |
| bb80 | 66 28 64 65 76 69 63 65 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 | f(device));................for.( |
| bba0 | 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 | var.i.=.0;.i.<.s_AllActivePlayer |
| bbc0 | 73 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 | sCount;.++i)..............{..... |
| bbe0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 45 78 | .............if.(ReadOnlyArrayEx |
| bc00 | 74 65 6e 73 69 6f 6e 73 2e 43 6f 6e 74 61 69 6e 73 52 65 66 65 72 65 6e 63 65 28 73 5f 41 6c 6c | tensions.ContainsReference(s_All |
| bc20 | 41 63 74 69 76 65 50 6c 61 79 65 72 73 5b 69 5d 2e 64 65 76 69 63 65 73 2c 20 64 65 76 69 63 65 | ActivePlayers[i].devices,.device |
| bc40 | 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 | ))......................return.s |
| bc60 | 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 | _AllActivePlayers[i];........... |
| bc80 | 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b | ...}................return.null; |
| bca0 | 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 73 75 6d 6d | ..........}............///.<summ |
| bcc0 | 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 6e 73 74 61 6e 74 69 61 74 65 20 61 20 | ary>..........///.Instantiate.a. |
| bce0 | 70 6c 61 79 65 72 20 6f 62 6a 65 63 74 20 61 6e 64 20 73 65 74 20 75 70 20 61 6e 64 20 65 6e 61 | player.object.and.set.up.and.ena |
| bd00 | 62 6c 65 20 69 74 73 20 69 6e 70 75 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 | ble.its.inputs...........///.</s |
| bd20 | 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 | ummary>..........///.<param.name |
| bd40 | 3d 22 70 72 65 66 61 62 22 3e 50 72 65 66 61 62 20 74 6f 20 63 6c 6f 6e 65 2e 20 4d 75 73 74 20 | ="prefab">Prefab.to.clone..Must. |
| bd60 | 63 6f 6e 74 61 69 6e 20 61 20 50 6c 61 79 65 72 49 6e 70 75 74 20 63 6f 6d 70 6f 6e 65 6e 74 20 | contain.a.PlayerInput.component. |
| bd80 | 73 6f 6d 65 77 68 65 72 65 20 69 6e 20 69 74 73 20 68 69 65 72 61 72 63 68 79 2e 3c 2f 70 61 72 | somewhere.in.its.hierarchy.</par |
| bda0 | 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 70 6c | am>..........///.<param.name="pl |
| bdc0 | 61 79 65 72 49 6e 64 65 78 22 3e 50 6c 61 79 65 72 20 69 6e 64 65 78 20 74 6f 20 61 73 73 69 67 | ayerIndex">Player.index.to.assig |
| bde0 | 6e 20 74 6f 20 74 68 65 20 70 6c 61 79 65 72 2e 20 53 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 | n.to.the.player..See.<see.cref=" |
| be00 | 50 6c 61 79 65 72 49 6e 70 75 74 2e 70 6c 61 79 65 72 49 6e 64 65 78 22 2f 3e 2e 0d 0a 20 20 20 | PlayerInput.playerIndex"/>...... |
| be20 | 20 20 20 20 20 2f 2f 2f 20 42 79 20 64 65 66 61 75 6c 74 20 77 69 6c 6c 20 62 65 20 61 73 73 69 | .....///.By.default.will.be.assi |
| be40 | 67 6e 65 64 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 62 61 73 65 64 20 6f 6e 20 68 6f 77 20 | gned.automatically.based.on.how. |
| be60 | 6d 61 6e 79 20 70 6c 61 79 65 72 73 20 61 72 65 20 69 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 61 | many.players.are.in.<see.cref="a |
| be80 | 6c 6c 22 2f 3e 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 | ll"/>.</param>..........///.<par |
| bea0 | 61 6d 20 6e 61 6d 65 3d 22 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 22 3e 43 6f 6e 74 72 6f 6c 20 | am.name="controlScheme">Control. |
| bec0 | 73 63 68 65 6d 65 20 74 6f 20 61 63 74 69 76 61 74 65 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 | scheme.to.activate</param>...... |
| bee0 | 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 73 70 6c 69 74 53 63 72 65 65 6e | ....///.<param.name="splitScreen |
| bf00 | 49 6e 64 65 78 22 3e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 | Index"></param>..........///.<pa |
| bf20 | 72 61 6d 20 6e 61 6d 65 3d 22 70 61 69 72 57 69 74 68 44 65 76 69 63 65 22 3e 44 65 76 69 63 65 | ram.name="pairWithDevice">Device |
| bf40 | 20 74 6f 20 70 61 69 72 20 74 6f 20 74 68 65 20 75 73 65 72 2e 20 42 79 20 64 65 66 61 75 6c 74 | .to.pair.to.the.user..By.default |
| bf60 | 2c 20 74 68 69 73 20 69 73 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 20 77 68 69 63 68 20 6d 65 61 6e | ,.this.is.<c>null</c>.which.mean |
| bf80 | 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 61 74 20 50 6c 61 79 65 72 49 6e 70 75 74 20 | s..........///.that.PlayerInput. |
| bfa0 | 77 69 6c 6c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 70 61 69 72 20 77 69 74 68 20 61 76 61 | will.automatically.pair.with.ava |
| bfc0 | 69 6c 61 62 6c 65 2c 20 75 6e 70 61 69 72 65 64 20 64 65 76 69 63 65 73 20 62 61 73 65 64 20 6f | ilable,.unpaired.devices.based.o |
| bfe0 | 6e 20 74 68 65 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 20 28 69 66 20 61 6e 79 29 0d 0a | n.the.control.schemes.(if.any).. |
| c000 | 20 20 20 20 20 20 20 20 2f 2f 2f 20 70 72 65 73 65 6e 74 20 69 6e 20 3c 73 65 65 20 63 72 65 66 | ........///.present.in.<see.cref |
| c020 | 3d 22 61 63 74 69 6f 6e 73 22 2f 3e 20 6f 72 20 6f 6e 20 74 68 65 20 62 69 6e 64 69 6e 67 73 20 | ="actions"/>.or.on.the.bindings. |
| c040 | 74 68 65 72 65 69 6e 20 28 69 66 20 6e 6f 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 20 61 | therein.(if.no.control.schemes.a |
| c060 | 72 65 20 70 72 65 73 65 6e 74 29 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f | re.present).</param>..........// |
| c080 | 2f 20 3c 72 65 74 75 72 6e 73 3e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f | /.<returns></returns>........../ |
| c0a0 | 2f 2f 20 3c 65 78 63 65 70 74 69 6f 6e 20 63 72 65 66 3d 22 41 72 67 75 6d 65 6e 74 4e 75 6c 6c | //.<exception.cref="ArgumentNull |
| c0c0 | 45 78 63 65 70 74 69 6f 6e 22 3e 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 70 72 65 66 61 | Exception"><paramref.name="prefa |
| c0e0 | 62 22 2f 3e 20 69 73 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 2e 3c 2f 65 78 63 65 70 74 69 6f 6e 3e | b"/>.is.<c>null</c>.</exception> |
| c100 | 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 50 6c 61 79 65 72 49 6e | ..........public.static.PlayerIn |
| c120 | 70 75 74 20 49 6e 73 74 61 6e 74 69 61 74 65 28 47 61 6d 65 4f 62 6a 65 63 74 20 70 72 65 66 61 | put.Instantiate(GameObject.prefa |
| c140 | 62 2c 20 69 6e 74 20 70 6c 61 79 65 72 49 6e 64 65 78 20 3d 20 2d 31 2c 20 73 74 72 69 6e 67 20 | b,.int.playerIndex.=.-1,.string. |
| c160 | 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 20 3d 20 6e 75 6c 6c 2c 0d 0a 20 20 20 20 20 20 20 20 20 | controlScheme.=.null,........... |
| c180 | 20 20 20 69 6e 74 20 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 20 3d 20 2d 31 2c 20 49 6e | ...int.splitScreenIndex.=.-1,.In |
| c1a0 | 70 75 74 44 65 76 69 63 65 20 70 61 69 72 57 69 74 68 44 65 76 69 63 65 20 3d 20 6e 75 6c 6c 29 | putDevice.pairWithDevice.=.null) |
| c1c0 | 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 69 66 20 28 70 72 65 | ..........{..............if.(pre |
| c1e0 | 66 61 62 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 | fab.==.null)..................th |
| c200 | 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 | row.new.ArgumentNullException(na |
| c220 | 6d 65 6f 66 28 70 72 65 66 61 62 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f | meof(prefab));................// |
| c240 | 20 53 65 74 20 69 6e 69 74 69 61 6c 69 7a 61 74 69 6f 6e 20 64 61 74 61 2e 0d 0a 20 20 20 20 20 | .Set.initialization.data........ |
| c260 | 20 20 20 20 20 20 20 73 5f 49 6e 69 74 50 6c 61 79 65 72 49 6e 64 65 78 20 3d 20 70 6c 61 79 65 | .......s_InitPlayerIndex.=.playe |
| c280 | 72 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 49 6e 69 74 53 70 6c 69 74 | rIndex;..............s_InitSplit |
| c2a0 | 53 63 72 65 65 6e 49 6e 64 65 78 20 3d 20 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 3b 0d | ScreenIndex.=.splitScreenIndex;. |
| c2c0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 49 6e 69 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 | .............s_InitControlScheme |
| c2e0 | 20 3d 20 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 | .=.controlScheme;..............i |
| c300 | 66 20 28 70 61 69 72 57 69 74 68 44 65 76 69 63 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 | f.(pairWithDevice.!=.null)...... |
| c320 | 20 20 20 20 20 20 20 20 20 20 20 20 41 72 72 61 79 48 65 6c 70 65 72 73 2e 41 70 70 65 6e 64 57 | ............ArrayHelpers.AppendW |
| c340 | 69 74 68 43 61 70 61 63 69 74 79 28 72 65 66 20 73 5f 49 6e 69 74 50 61 69 72 57 69 74 68 44 65 | ithCapacity(ref.s_InitPairWithDe |
| c360 | 76 69 63 65 73 2c 20 72 65 66 20 73 5f 49 6e 69 74 50 61 69 72 57 69 74 68 44 65 76 69 63 65 73 | vices,.ref.s_InitPairWithDevices |
| c380 | 43 6f 75 6e 74 2c 20 70 61 69 72 57 69 74 68 44 65 76 69 63 65 29 3b 0d 0a 0d 0a 20 20 20 20 20 | Count,.pairWithDevice);......... |
| c3a0 | 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 44 6f 49 6e 73 74 61 6e 74 69 61 74 65 28 70 72 65 66 | .......return.DoInstantiate(pref |
| c3c0 | 61 62 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 54 | ab);..........}............////T |
| c3e0 | 4f 44 4f 3a 20 61 6c 6c 6f 77 20 69 6e 73 74 61 6e 74 69 61 74 69 6e 67 20 77 69 74 68 20 61 6e | ODO:.allow.instantiating.with.an |
| c400 | 20 65 78 69 73 74 69 6e 67 20 49 6e 70 75 74 55 73 65 72 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f | .existing.InputUser............/ |
| c420 | 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 41 20 77 72 61 70 | //.<summary>..........///.A.wrap |
| c440 | 70 65 72 20 61 72 6f 75 6e 64 20 3c 73 65 65 20 63 72 65 66 3d 22 4f 62 6a 65 63 74 2e 49 6e 73 | per.around.<see.cref="Object.Ins |
| c460 | 74 61 6e 74 69 61 74 65 28 4f 62 6a 65 63 74 29 22 2f 3e 20 74 68 61 74 20 61 6c 6c 6f 77 73 20 | tantiate(Object)"/>.that.allows. |
| c480 | 69 6e 73 74 61 6e 74 69 61 74 69 6e 67 20 61 20 70 6c 61 79 65 72 20 70 72 65 66 61 62 20 61 6e | instantiating.a.player.prefab.an |
| c4a0 | 64 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 70 61 69 | d..........///.automatically.pai |
| c4c0 | 72 20 6f 6e 65 20 6f 72 20 6d 6f 72 65 20 73 70 65 63 69 66 69 63 20 64 65 76 69 63 65 73 20 74 | r.one.or.more.specific.devices.t |
| c4e0 | 6f 20 74 68 65 20 6e 65 77 6c 79 20 63 72 65 61 74 65 64 20 70 6c 61 79 65 72 2e 0d 0a 20 20 20 | o.the.newly.created.player...... |
| c500 | 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 2f | .....///.</summary>........../// |
| c520 | 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 70 72 65 66 61 62 22 3e 41 20 70 6c 61 79 65 72 20 70 | .<param.name="prefab">A.player.p |
| c540 | 72 65 66 61 62 20 63 6f 6e 74 61 69 6e 69 6e 67 20 61 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c | refab.containing.a.<see.cref="Pl |
| c560 | 61 79 65 72 49 6e 70 75 74 22 2f 3e 20 63 6f 6d 70 6f 6e 65 6e 74 20 69 6e 20 69 74 73 20 68 69 | ayerInput"/>.component.in.its.hi |
| c580 | 65 72 61 72 63 68 79 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 | erarchy.</param>..........///.<p |
| c5a0 | 61 72 61 6d 20 6e 61 6d 65 3d 22 70 6c 61 79 65 72 49 6e 64 65 78 22 3e 3c 2f 70 61 72 61 6d 3e | aram.name="playerIndex"></param> |
| c5c0 | 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 63 6f 6e 74 72 | ..........///.<param.name="contr |
| c5e0 | 6f 6c 53 63 68 65 6d 65 22 3e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 | olScheme"></param>..........///. |
| c600 | 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 22 3e 3c | <param.name="splitScreenIndex">< |
| c620 | 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 | /param>..........///.<param.name |
| c640 | 3d 22 70 61 69 72 57 69 74 68 44 65 76 69 63 65 73 22 3e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 | ="pairWithDevices"></param>..... |
| c660 | 20 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 | .....///.<returns></returns>.... |
| c680 | 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f | ......///.<remarks>........../// |
| c6a0 | 20 4e 6f 74 65 20 74 68 61 74 20 75 6e 6c 69 6b 65 20 3c 73 65 65 20 63 72 65 66 3d 22 4f 62 6a | .Note.that.unlike.<see.cref="Obj |
| c6c0 | 65 63 74 2e 49 6e 73 74 61 6e 74 69 61 74 65 28 4f 62 6a 65 63 74 29 22 2f 3e 2c 20 74 68 69 73 | ect.Instantiate(Object)"/>,.this |
| c6e0 | 20 6d 65 74 68 6f 64 20 77 69 6c 6c 20 61 6c 77 61 79 73 20 61 63 74 69 76 61 74 65 20 74 68 65 | .method.will.always.activate.the |
| c700 | 20 72 65 73 75 6c 74 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 65 | .resulting..........///.<see.cre |
| c720 | 66 3d 22 47 61 6d 65 4f 62 6a 65 63 74 22 2f 3e 20 61 6e 64 20 69 74 73 20 63 6f 6d 70 6f 6e 65 | f="GameObject"/>.and.its.compone |
| c740 | 6e 74 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 | nts...........///.</remarks>.... |
| c760 | 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 50 6c 61 79 65 72 49 6e 70 75 74 20 | ......public.static.PlayerInput. |
| c780 | 49 6e 73 74 61 6e 74 69 61 74 65 28 47 61 6d 65 4f 62 6a 65 63 74 20 70 72 65 66 61 62 2c 20 69 | Instantiate(GameObject.prefab,.i |
| c7a0 | 6e 74 20 70 6c 61 79 65 72 49 6e 64 65 78 20 3d 20 2d 31 2c 20 73 74 72 69 6e 67 20 63 6f 6e 74 | nt.playerIndex.=.-1,.string.cont |
| c7c0 | 72 6f 6c 53 63 68 65 6d 65 20 3d 20 6e 75 6c 6c 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 | rolScheme.=.null,..............i |
| c7e0 | 6e 74 20 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 20 3d 20 2d 31 2c 20 70 61 72 61 6d 73 | nt.splitScreenIndex.=.-1,.params |
| c800 | 20 49 6e 70 75 74 44 65 76 69 63 65 5b 5d 20 70 61 69 72 57 69 74 68 44 65 76 69 63 65 73 29 0d | .InputDevice[].pairWithDevices). |
| c820 | 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 72 65 66 | .........{..............if.(pref |
| c840 | 61 62 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 | ab.==.null)..................thr |
| c860 | 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d | ow.new.ArgumentNullException(nam |
| c880 | 65 6f 66 28 70 72 65 66 61 62 29 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 | eof(prefab));................//. |
| c8a0 | 53 65 74 20 69 6e 69 74 69 61 6c 69 7a 61 74 69 6f 6e 20 64 61 74 61 2e 0d 0a 20 20 20 20 20 20 | Set.initialization.data......... |
| c8c0 | 20 20 20 20 20 20 73 5f 49 6e 69 74 50 6c 61 79 65 72 49 6e 64 65 78 20 3d 20 70 6c 61 79 65 72 | ......s_InitPlayerIndex.=.player |
| c8e0 | 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 49 6e 69 74 53 70 6c 69 74 53 | Index;..............s_InitSplitS |
| c900 | 63 72 65 65 6e 49 6e 64 65 78 20 3d 20 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 3b 0d 0a | creenIndex.=.splitScreenIndex;.. |
| c920 | 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 49 6e 69 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 20 | ............s_InitControlScheme. |
| c940 | 3d 20 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 | =.controlScheme;..............if |
| c960 | 20 28 70 61 69 72 57 69 74 68 44 65 76 69 63 65 73 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 | .(pairWithDevices.!=.null)...... |
| c980 | 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 66 6f 72 20 28 | ........{..................for.( |
| c9a0 | 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 70 61 69 72 57 69 74 68 44 65 76 69 63 65 73 2e 4c | var.i.=.0;.i.<.pairWithDevices.L |
| c9c0 | 65 6e 67 74 68 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ength;.++i)..................... |
| c9e0 | 20 41 72 72 61 79 48 65 6c 70 65 72 73 2e 41 70 70 65 6e 64 57 69 74 68 43 61 70 61 63 69 74 79 | .ArrayHelpers.AppendWithCapacity |
| ca00 | 28 72 65 66 20 73 5f 49 6e 69 74 50 61 69 72 57 69 74 68 44 65 76 69 63 65 73 2c 20 72 65 66 20 | (ref.s_InitPairWithDevices,.ref. |
| ca20 | 73 5f 49 6e 69 74 50 61 69 72 57 69 74 68 44 65 76 69 63 65 73 43 6f 75 6e 74 2c 20 70 61 69 72 | s_InitPairWithDevicesCount,.pair |
| ca40 | 57 69 74 68 44 65 76 69 63 65 73 5b 69 5d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d | WithDevices[i]);..............}. |
| ca60 | 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 44 6f 49 6e 73 74 61 6e 74 69 | ...............return.DoInstanti |
| ca80 | 61 74 65 28 70 72 65 66 61 62 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 | ate(prefab);..........}......... |
| caa0 | 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 50 6c 61 79 65 72 49 6e 70 75 74 20 44 6f | ...private.static.PlayerInput.Do |
| cac0 | 49 6e 73 74 61 6e 74 69 61 74 65 28 47 61 6d 65 4f 62 6a 65 63 74 20 70 72 65 66 61 62 29 0d 0a | Instantiate(GameObject.prefab).. |
| cae0 | 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 64 65 73 74 72 | ........{..............var.destr |
| cb00 | 6f 79 49 66 44 65 76 69 63 65 53 65 74 75 70 55 6e 73 75 63 63 65 73 73 66 75 6c 20 3d 20 73 5f | oyIfDeviceSetupUnsuccessful.=.s_ |
| cb20 | 44 65 73 74 72 6f 79 49 66 44 65 76 69 63 65 53 65 74 75 70 55 6e 73 75 63 63 65 73 73 66 75 6c | DestroyIfDeviceSetupUnsuccessful |
| cb40 | 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 47 61 6d 65 4f 62 6a 65 63 74 20 69 6e 73 74 | ;................GameObject.inst |
| cb60 | 61 6e 63 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 72 79 0d 0a 20 20 20 20 20 20 20 20 | ance;..............try.......... |
| cb80 | 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 73 74 61 6e 63 65 20 | ....{..................instance. |
| cba0 | 3d 20 4f 62 6a 65 63 74 2e 49 6e 73 74 61 6e 74 69 61 74 65 28 70 72 65 66 61 62 29 3b 0d 0a 20 | =.Object.Instantiate(prefab);... |
| cbc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 73 74 61 6e 63 65 2e 53 65 74 41 63 74 69 76 | ...............instance.SetActiv |
| cbe0 | 65 28 74 72 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 | e(true);..............}......... |
| cc00 | 20 20 20 20 20 66 69 6e 61 6c 6c 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 | .....finally..............{..... |
| cc20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 73 65 74 20 69 6e 69 74 20 64 61 74 61 2e | .............//.Reset.init.data. |
| cc40 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 49 6e 69 74 50 61 69 72 57 69 74 68 | ..................s_InitPairWith |
| cc60 | 44 65 76 69 63 65 73 43 6f 75 6e 74 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | DevicesCount.=.0;............... |
| cc80 | 20 20 20 69 66 20 28 73 5f 49 6e 69 74 50 61 69 72 57 69 74 68 44 65 76 69 63 65 73 20 21 3d 20 | ...if.(s_InitPairWithDevices.!=. |
| cca0 | 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 72 72 61 79 | null)......................Array |
| ccc0 | 2e 43 6c 65 61 72 28 73 5f 49 6e 69 74 50 61 69 72 57 69 74 68 44 65 76 69 63 65 73 2c 20 30 2c | .Clear(s_InitPairWithDevices,.0, |
| cce0 | 20 73 5f 49 6e 69 74 50 61 69 72 57 69 74 68 44 65 76 69 63 65 73 43 6f 75 6e 74 29 3b 0d 0a 20 | .s_InitPairWithDevicesCount);... |
| cd00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 49 6e 69 74 43 6f 6e 74 72 6f 6c 53 63 68 65 | ...............s_InitControlSche |
| cd20 | 6d 65 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 49 6e | me.=.null;..................s_In |
| cd40 | 69 74 50 6c 61 79 65 72 49 6e 64 65 78 20 3d 20 2d 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | itPlayerIndex.=.-1;............. |
| cd60 | 20 20 20 20 20 73 5f 49 6e 69 74 53 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 20 3d 20 2d 31 | .....s_InitSplitScreenIndex.=.-1 |
| cd80 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 44 65 73 74 72 6f 79 49 66 44 65 | ;..................s_DestroyIfDe |
| cda0 | 76 69 63 65 53 65 74 75 70 55 6e 73 75 63 63 65 73 73 66 75 6c 20 3d 20 66 61 6c 73 65 3b 0d 0a | viceSetupUnsuccessful.=.false;.. |
| cdc0 | 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 | ............}................var |
| cde0 | 20 70 6c 61 79 65 72 49 6e 70 75 74 20 3d 20 69 6e 73 74 61 6e 63 65 2e 47 65 74 43 6f 6d 70 6f | .playerInput.=.instance.GetCompo |
| ce00 | 6e 65 6e 74 49 6e 43 68 69 6c 64 72 65 6e 3c 50 6c 61 79 65 72 49 6e 70 75 74 3e 28 29 3b 0d 0a | nentInChildren<PlayerInput>();.. |
| ce20 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 6c 61 79 65 72 49 6e 70 75 74 20 3d 3d 20 6e | ............if.(playerInput.==.n |
| ce40 | 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ull)..............{............. |
| ce60 | 20 20 20 20 20 44 65 73 74 72 6f 79 49 6d 6d 65 64 69 61 74 65 28 69 6e 73 74 61 6e 63 65 29 3b | .....DestroyImmediate(instance); |
| ce80 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 45 72 72 6f 72 | ..................Debug.LogError |
| cea0 | 28 22 54 68 65 20 47 61 6d 65 4f 62 6a 65 63 74 20 64 6f 65 73 20 6e 6f 74 20 68 61 76 65 20 61 | ("The.GameObject.does.not.have.a |
| cec0 | 20 50 6c 61 79 65 72 49 6e 70 75 74 20 63 6f 6d 70 6f 6e 65 6e 74 22 2c 20 70 72 65 66 61 62 29 | .PlayerInput.component",.prefab) |
| cee0 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0d | ;..................return.null;. |
| cf00 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 | .............}................if |
| cf20 | 20 28 64 65 73 74 72 6f 79 49 66 44 65 76 69 63 65 53 65 74 75 70 55 6e 73 75 63 63 65 73 73 66 | .(destroyIfDeviceSetupUnsuccessf |
| cf40 | 75 6c 20 26 26 20 28 21 70 6c 61 79 65 72 49 6e 70 75 74 2e 75 73 65 72 2e 76 61 6c 69 64 20 7c | ul.&&.(!playerInput.user.valid.| |
| cf60 | 7c 20 70 6c 61 79 65 72 49 6e 70 75 74 2e 68 61 73 4d 69 73 73 69 6e 67 52 65 71 75 69 72 65 64 | |.playerInput.hasMissingRequired |
| cf80 | 44 65 76 69 63 65 73 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 | Devices))..............{........ |
| cfa0 | 20 20 20 20 20 20 20 20 20 20 44 65 73 74 72 6f 79 49 6d 6d 65 64 69 61 74 65 28 69 6e 73 74 61 | ..........DestroyImmediate(insta |
| cfc0 | 6e 63 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 75 | nce);..................return.nu |
| cfe0 | 6c 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 20 20 20 20 | ll;..............}.............. |
| d000 | 20 20 72 65 74 75 72 6e 20 70 6c 61 79 65 72 49 6e 70 75 74 3b 0d 0a 20 20 20 20 20 20 20 20 7d | ..return.playerInput;..........} |
| d020 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5b 54 6f 6f 6c 74 69 70 28 22 49 6e 70 75 74 20 61 63 74 69 | ............[Tooltip("Input.acti |
| d040 | 6f 6e 73 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 74 68 20 74 68 65 20 70 6c 61 79 65 72 2e 22 | ons.associated.with.the.player." |
| d060 | 29 5d 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 20 69 6e 74 | )]..........[SerializeField].int |
| d080 | 65 72 6e 61 6c 20 49 6e 70 75 74 41 63 74 69 6f 6e 41 73 73 65 74 20 6d 5f 41 63 74 69 6f 6e 73 | ernal.InputActionAsset.m_Actions |
| d0a0 | 3b 0d 0a 20 20 20 20 20 20 20 20 5b 54 6f 6f 6c 74 69 70 28 22 44 65 74 65 72 6d 69 6e 65 20 68 | ;..........[Tooltip("Determine.h |
| d0c0 | 6f 77 20 6e 6f 74 69 66 69 63 61 74 69 6f 6e 73 20 73 68 6f 75 6c 64 20 62 65 20 73 65 6e 74 20 | ow.notifications.should.be.sent. |
| d0e0 | 77 68 65 6e 20 61 6e 20 69 6e 70 75 74 2d 72 65 6c 61 74 65 64 20 65 76 65 6e 74 20 61 73 73 6f | when.an.input-related.event.asso |
| d100 | 63 69 61 74 65 64 20 77 69 74 68 20 74 68 65 20 70 6c 61 79 65 72 20 68 61 70 70 65 6e 73 2e 22 | ciated.with.the.player.happens." |
| d120 | 29 5d 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 20 69 6e 74 | )]..........[SerializeField].int |
| d140 | 65 72 6e 61 6c 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 20 6d 5f 4e 6f 74 69 | ernal.PlayerNotifications.m_Noti |
| d160 | 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 3b 0d 0a 20 20 20 20 20 20 20 20 5b 54 6f 6f 6c | ficationBehavior;..........[Tool |
| d180 | 74 69 70 28 22 55 49 20 49 6e 70 75 74 4d 6f 64 75 6c 65 20 74 68 61 74 20 73 68 6f 75 6c 64 20 | tip("UI.InputModule.that.should. |
| d1a0 | 68 61 76 65 20 69 74 27 73 20 69 6e 70 75 74 20 61 63 74 69 6f 6e 73 20 73 79 6e 63 68 72 6f 6e | have.it's.input.actions.synchron |
| d1c0 | 69 7a 65 64 20 74 6f 20 74 68 69 73 20 50 6c 61 79 65 72 49 6e 70 75 74 27 73 20 61 63 74 69 6f | ized.to.this.PlayerInput's.actio |
| d1e0 | 6e 73 2e 22 29 5d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 54 59 5f 49 4e 50 55 | ns.")]............#if.UNITY_INPU |
| d200 | 54 5f 53 59 53 54 45 4d 5f 45 4e 41 42 4c 45 5f 55 49 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 | T_SYSTEM_ENABLE_UI..........[Ser |
| d220 | 69 61 6c 69 7a 65 46 69 65 6c 64 5d 20 69 6e 74 65 72 6e 61 6c 20 49 6e 70 75 74 53 79 73 74 65 | ializeField].internal.InputSyste |
| d240 | 6d 55 49 49 6e 70 75 74 4d 6f 64 75 6c 65 20 6d 5f 55 49 49 6e 70 75 74 4d 6f 64 75 6c 65 3b 0d | mUIInputModule.m_UIInputModule;. |
| d260 | 0a 20 20 20 20 20 20 20 20 5b 54 6f 6f 6c 74 69 70 28 22 45 76 65 6e 74 20 74 68 61 74 20 69 73 | .........[Tooltip("Event.that.is |
| d280 | 20 74 72 69 67 67 65 72 65 64 20 77 68 65 6e 20 74 68 65 20 50 6c 61 79 65 72 49 6e 70 75 74 20 | .triggered.when.the.PlayerInput. |
| d2a0 | 6c 6f 73 65 73 20 61 20 70 61 69 72 65 64 20 64 65 76 69 63 65 20 28 65 2e 67 2e 20 69 74 73 20 | loses.a.paired.device.(e.g..its. |
| d2c0 | 62 61 74 74 65 72 79 20 72 75 6e 73 20 6f 75 74 29 2e 22 29 5d 0d 0a 20 20 20 20 20 20 20 20 23 | battery.runs.out).")]..........# |
| d2e0 | 65 6e 64 69 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 | endif............[SerializeField |
| d300 | 5d 20 69 6e 74 65 72 6e 61 6c 20 44 65 76 69 63 65 4c 6f 73 74 45 76 65 6e 74 20 6d 5f 44 65 76 | ].internal.DeviceLostEvent.m_Dev |
| d320 | 69 63 65 4c 6f 73 74 45 76 65 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a | iceLostEvent;..........[Serializ |
| d340 | 65 46 69 65 6c 64 5d 20 69 6e 74 65 72 6e 61 6c 20 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 45 | eField].internal.DeviceRegainedE |
| d360 | 76 65 6e 74 20 6d 5f 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 45 76 65 6e 74 3b 0d 0a 20 20 20 | vent.m_DeviceRegainedEvent;..... |
| d380 | 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 20 69 6e 74 65 72 6e 61 6c 20 43 | .....[SerializeField].internal.C |
| d3a0 | 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 65 64 45 76 65 6e 74 20 6d 5f 43 6f 6e 74 72 6f 6c 73 43 68 | ontrolsChangedEvent.m_ControlsCh |
| d3c0 | 61 6e 67 65 64 45 76 65 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 | angedEvent;..........[SerializeF |
| d3e0 | 69 65 6c 64 5d 20 69 6e 74 65 72 6e 61 6c 20 41 63 74 69 6f 6e 45 76 65 6e 74 5b 5d 20 6d 5f 41 | ield].internal.ActionEvent[].m_A |
| d400 | 63 74 69 6f 6e 45 76 65 6e 74 73 3b 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 | ctionEvents;..........[Serialize |
| d420 | 46 69 65 6c 64 5d 20 69 6e 74 65 72 6e 61 6c 20 62 6f 6f 6c 20 6d 5f 4e 65 76 65 72 41 75 74 6f | Field].internal.bool.m_NeverAuto |
| d440 | 53 77 69 74 63 68 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 5b | SwitchControlSchemes;..........[ |
| d460 | 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 20 69 6e 74 65 72 6e 61 6c 20 73 74 72 69 6e 67 20 | SerializeField].internal.string. |
| d480 | 6d 5f 44 65 66 61 75 6c 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 3b 2f 2f 2f 2f 52 45 56 49 45 | m_DefaultControlScheme;////REVIE |
| d4a0 | 57 3a 20 73 68 6f 75 6c 64 20 77 65 20 68 61 76 65 20 49 44 73 20 66 6f 72 20 74 68 65 73 65 20 | W:.should.we.have.IDs.for.these. |
| d4c0 | 73 6f 20 77 65 20 63 61 6e 20 72 65 6e 61 6d 65 20 73 61 66 65 6c 79 3f 0d 0a 20 20 20 20 20 20 | so.we.can.rename.safely?........ |
| d4e0 | 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 20 69 6e 74 65 72 6e 61 6c 20 73 74 72 69 | ..[SerializeField].internal.stri |
| d500 | 6e 67 20 6d 5f 44 65 66 61 75 6c 74 41 63 74 69 6f 6e 4d 61 70 3b 0d 0a 20 20 20 20 20 20 20 20 | ng.m_DefaultActionMap;.......... |
| d520 | 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 20 69 6e 74 65 72 6e 61 6c 20 69 6e 74 20 6d 5f | [SerializeField].internal.int.m_ |
| d540 | 53 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 20 3d 20 2d 31 3b 0d 0a 20 20 20 20 20 20 20 20 | SplitScreenIndex.=.-1;.......... |
| d560 | 5b 54 6f 6f 6c 74 69 70 28 22 52 65 66 65 72 65 6e 63 65 20 74 6f 20 74 68 65 20 70 6c 61 79 65 | [Tooltip("Reference.to.the.playe |
| d580 | 72 27 73 20 76 69 65 77 20 63 61 6d 65 72 61 2e 20 4e 6f 74 65 20 74 68 61 74 20 74 68 69 73 20 | r's.view.camera..Note.that.this. |
| d5a0 | 69 73 20 6f 6e 6c 79 20 72 65 71 75 69 72 65 64 20 77 68 65 6e 20 75 73 69 6e 67 20 73 70 6c 69 | is.only.required.when.using.spli |
| d5c0 | 74 2d 73 63 72 65 65 6e 20 61 6e 64 2f 6f 72 20 22 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2b | t-screen.and/or."..............+ |
| d5e0 | 20 22 70 65 72 2d 70 6c 61 79 65 72 20 55 49 73 2e 20 4f 74 68 65 72 77 69 73 65 20 69 74 20 69 | ."per-player.UIs..Otherwise.it.i |
| d600 | 73 20 73 61 66 65 20 74 6f 20 6c 65 61 76 65 20 74 68 69 73 20 70 72 6f 70 65 72 74 79 20 75 6e | s.safe.to.leave.this.property.un |
| d620 | 69 6e 69 74 69 61 6c 69 7a 65 64 2e 22 29 5d 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c | initialized.")]..........[Serial |
| d640 | 69 7a 65 46 69 65 6c 64 5d 20 69 6e 74 65 72 6e 61 6c 20 43 61 6d 65 72 61 20 6d 5f 43 61 6d 65 | izeField].internal.Camera.m_Came |
| d660 | 72 61 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 56 61 6c 75 65 20 6f 62 6a 65 63 74 20 77 | ra;............//.Value.object.w |
| d680 | 65 20 75 73 65 20 77 68 65 6e 20 73 65 6e 64 69 6e 67 20 6d 65 73 73 61 67 65 73 20 76 69 61 20 | e.use.when.sending.messages.via. |
| d6a0 | 53 65 6e 64 4d 65 73 73 61 67 65 28 29 20 6f 72 20 42 72 6f 61 64 63 61 73 74 4d 65 73 73 61 67 | SendMessage().or.BroadcastMessag |
| d6c0 | 65 28 29 2e 20 43 61 6e 20 62 65 20 69 67 6e 6f 72 65 64 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 | e()..Can.be.ignored..........//. |
| d6e0 | 62 79 20 74 68 65 20 72 65 63 65 69 76 65 72 2e 20 57 65 20 72 65 75 73 65 20 74 68 65 20 73 61 | by.the.receiver..We.reuse.the.sa |
| d700 | 6d 65 20 6f 62 6a 65 63 74 20 6f 76 65 72 20 61 6e 64 20 6f 76 65 72 20 74 6f 20 61 76 6f 69 64 | me.object.over.and.over.to.avoid |
| d720 | 20 61 6c 6c 6f 63 61 74 69 6e 67 20 67 61 72 62 61 67 65 2e 0d 0a 20 20 20 20 20 20 20 20 5b 4e | .allocating.garbage...........[N |
| d740 | 6f 6e 53 65 72 69 61 6c 69 7a 65 64 5d 20 70 72 69 76 61 74 65 20 49 6e 70 75 74 56 61 6c 75 65 | onSerialized].private.InputValue |
| d760 | 20 6d 5f 49 6e 70 75 74 56 61 6c 75 65 4f 62 6a 65 63 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | .m_InputValueObject;............ |
| d780 | 5b 4e 6f 6e 53 65 72 69 61 6c 69 7a 65 64 5d 20 69 6e 74 65 72 6e 61 6c 20 49 6e 70 75 74 41 63 | [NonSerialized].internal.InputAc |
| d7a0 | 74 69 6f 6e 4d 61 70 20 6d 5f 43 75 72 72 65 6e 74 41 63 74 69 6f 6e 4d 61 70 3b 0d 0a 0d 0a 20 | tionMap.m_CurrentActionMap;..... |
| d7c0 | 20 20 20 20 20 20 20 5b 4e 6f 6e 53 65 72 69 61 6c 69 7a 65 64 5d 20 70 72 69 76 61 74 65 20 69 | .......[NonSerialized].private.i |
| d7e0 | 6e 74 20 6d 5f 50 6c 61 79 65 72 49 6e 64 65 78 20 3d 20 2d 31 3b 0d 0a 20 20 20 20 20 20 20 20 | nt.m_PlayerIndex.=.-1;.......... |
| d800 | 5b 4e 6f 6e 53 65 72 69 61 6c 69 7a 65 64 5d 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 6d 5f 49 | [NonSerialized].private.bool.m_I |
| d820 | 6e 70 75 74 41 63 74 69 76 65 3b 0d 0a 20 20 20 20 20 20 20 20 5b 4e 6f 6e 53 65 72 69 61 6c 69 | nputActive;..........[NonSeriali |
| d840 | 7a 65 64 5d 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 6d 5f 45 6e 61 62 6c 65 64 3b 0d 0a 20 20 | zed].private.bool.m_Enabled;.... |
| d860 | 20 20 20 20 20 20 5b 4e 6f 6e 53 65 72 69 61 6c 69 7a 65 64 5d 20 70 72 69 76 61 74 65 20 62 6f | ......[NonSerialized].private.bo |
| d880 | 6f 6c 20 6d 5f 41 63 74 69 6f 6e 73 49 6e 69 74 69 61 6c 69 7a 65 64 3b 0d 0a 20 20 20 20 20 20 | ol.m_ActionsInitialized;........ |
| d8a0 | 20 20 5b 4e 6f 6e 53 65 72 69 61 6c 69 7a 65 64 5d 20 70 72 69 76 61 74 65 20 44 69 63 74 69 6f | ..[NonSerialized].private.Dictio |
| d8c0 | 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 3e 20 6d 5f 41 63 74 69 6f 6e 4d 65 73 | nary<string,.string>.m_ActionMes |
| d8e0 | 73 61 67 65 4e 61 6d 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 5b 4e 6f 6e 53 65 72 69 61 6c 69 7a | sageNames;..........[NonSerializ |
| d900 | 65 64 5d 20 70 72 69 76 61 74 65 20 49 6e 70 75 74 55 73 65 72 20 6d 5f 49 6e 70 75 74 55 73 65 | ed].private.InputUser.m_InputUse |
| d920 | 72 3b 0d 0a 20 20 20 20 20 20 20 20 5b 4e 6f 6e 53 65 72 69 61 6c 69 7a 65 64 5d 20 70 72 69 76 | r;..........[NonSerialized].priv |
| d940 | 61 74 65 20 41 63 74 69 6f 6e 3c 49 6e 70 75 74 41 63 74 69 6f 6e 2e 43 61 6c 6c 62 61 63 6b 43 | ate.Action<InputAction.CallbackC |
| d960 | 6f 6e 74 65 78 74 3e 20 6d 5f 41 63 74 69 6f 6e 54 72 69 67 67 65 72 65 64 44 65 6c 65 67 61 74 | ontext>.m_ActionTriggeredDelegat |
| d980 | 65 3b 0d 0a 20 20 20 20 20 20 20 20 5b 4e 6f 6e 53 65 72 69 61 6c 69 7a 65 64 5d 20 70 72 69 76 | e;..........[NonSerialized].priv |
| d9a0 | 61 74 65 20 49 6e 6c 69 6e 65 64 41 72 72 61 79 3c 41 63 74 69 6f 6e 3c 50 6c 61 79 65 72 49 6e | ate.InlinedArray<Action<PlayerIn |
| d9c0 | 70 75 74 3e 3e 20 6d 5f 44 65 76 69 63 65 4c 6f 73 74 43 61 6c 6c 62 61 63 6b 73 3b 0d 0a 20 20 | put>>.m_DeviceLostCallbacks;.... |
| d9e0 | 20 20 20 20 20 20 5b 4e 6f 6e 53 65 72 69 61 6c 69 7a 65 64 5d 20 70 72 69 76 61 74 65 20 49 6e | ......[NonSerialized].private.In |
| da00 | 6c 69 6e 65 64 41 72 72 61 79 3c 41 63 74 69 6f 6e 3c 50 6c 61 79 65 72 49 6e 70 75 74 3e 3e 20 | linedArray<Action<PlayerInput>>. |
| da20 | 6d 5f 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 43 61 6c 6c 62 61 63 6b 73 3b 0d 0a 20 20 20 20 | m_DeviceRegainedCallbacks;...... |
| da40 | 20 20 20 20 5b 4e 6f 6e 53 65 72 69 61 6c 69 7a 65 64 5d 20 70 72 69 76 61 74 65 20 49 6e 6c 69 | ....[NonSerialized].private.Inli |
| da60 | 6e 65 64 41 72 72 61 79 3c 41 63 74 69 6f 6e 3c 50 6c 61 79 65 72 49 6e 70 75 74 3e 3e 20 6d 5f | nedArray<Action<PlayerInput>>.m_ |
| da80 | 43 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 65 64 43 61 6c 6c 62 61 63 6b 73 3b 0d 0a 20 20 20 20 20 | ControlsChangedCallbacks;....... |
| daa0 | 20 20 20 5b 4e 6f 6e 53 65 72 69 61 6c 69 7a 65 64 5d 20 70 72 69 76 61 74 65 20 49 6e 6c 69 6e | ...[NonSerialized].private.Inlin |
| dac0 | 65 64 41 72 72 61 79 3c 41 63 74 69 6f 6e 3c 49 6e 70 75 74 41 63 74 69 6f 6e 2e 43 61 6c 6c 62 | edArray<Action<InputAction.Callb |
| dae0 | 61 63 6b 43 6f 6e 74 65 78 74 3e 3e 20 6d 5f 41 63 74 69 6f 6e 54 72 69 67 67 65 72 65 64 43 61 | ackContext>>.m_ActionTriggeredCa |
| db00 | 6c 6c 62 61 63 6b 73 3b 0d 0a 20 20 20 20 20 20 20 20 5b 4e 6f 6e 53 65 72 69 61 6c 69 7a 65 64 | llbacks;..........[NonSerialized |
| db20 | 5d 20 70 72 69 76 61 74 65 20 41 63 74 69 6f 6e 3c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2c 20 49 | ].private.Action<InputControl,.I |
| db40 | 6e 70 75 74 45 76 65 6e 74 50 74 72 3e 20 6d 5f 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 55 73 | nputEventPtr>.m_UnpairedDeviceUs |
| db60 | 65 64 44 65 6c 65 67 61 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 5b 4e 6f 6e 53 65 72 69 61 6c 69 | edDelegate;..........[NonSeriali |
| db80 | 7a 65 64 5d 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 6d 5f 4f 6e 55 6e 70 61 69 72 65 64 44 65 | zed].private.bool.m_OnUnpairedDe |
| dba0 | 76 69 63 65 55 73 65 64 48 6f 6f 6b 65 64 3b 0d 0a 20 20 20 20 20 20 20 20 5b 4e 6f 6e 53 65 72 | viceUsedHooked;..........[NonSer |
| dbc0 | 69 61 6c 69 7a 65 64 5d 20 70 72 69 76 61 74 65 20 41 63 74 69 6f 6e 3c 49 6e 70 75 74 44 65 76 | ialized].private.Action<InputDev |
| dbe0 | 69 63 65 2c 20 49 6e 70 75 74 44 65 76 69 63 65 43 68 61 6e 67 65 3e 20 6d 5f 44 65 76 69 63 65 | ice,.InputDeviceChange>.m_Device |
| dc00 | 43 68 61 6e 67 65 44 65 6c 65 67 61 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 5b 4e 6f 6e 53 65 72 | ChangeDelegate;..........[NonSer |
| dc20 | 69 61 6c 69 7a 65 64 5d 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 6d 5f 4f 6e 44 65 76 69 63 65 | ialized].private.bool.m_OnDevice |
| dc40 | 43 68 61 6e 67 65 48 6f 6f 6b 65 64 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 | ChangeHooked;............interna |
| dc60 | 6c 20 73 74 61 74 69 63 20 69 6e 74 20 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 43 | l.static.int.s_AllActivePlayersC |
| dc80 | 6f 75 6e 74 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 50 | ount;..........internal.static.P |
| dca0 | 6c 61 79 65 72 49 6e 70 75 74 5b 5d 20 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 3b | layerInput[].s_AllActivePlayers; |
| dcc0 | 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 41 63 74 69 6f 6e 3c | ..........private.static.Action< |
| dce0 | 49 6e 70 75 74 55 73 65 72 2c 20 49 6e 70 75 74 55 73 65 72 43 68 61 6e 67 65 2c 20 49 6e 70 75 | InputUser,.InputUserChange,.Inpu |
| dd00 | 74 44 65 76 69 63 65 3e 20 73 5f 55 73 65 72 43 68 61 6e 67 65 44 65 6c 65 67 61 74 65 3b 0d 0a | tDevice>.s_UserChangeDelegate;.. |
| dd20 | 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 69 6e 66 6f 72 | ..........//.The.following.infor |
| dd40 | 6d 61 74 69 6f 6e 20 69 73 20 75 73 65 64 20 77 68 65 6e 20 74 68 65 20 6e 65 78 74 20 50 6c 61 | mation.is.used.when.the.next.Pla |
| dd60 | 79 65 72 49 6e 70 75 74 20 63 6f 6d 70 6f 6e 65 6e 74 20 69 73 20 65 6e 61 62 6c 65 64 2e 0d 0a | yerInput.component.is.enabled... |
| dd80 | 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 69 6e 74 20 73 5f 49 | ..........private.static.int.s_I |
| dda0 | 6e 69 74 50 61 69 72 57 69 74 68 44 65 76 69 63 65 73 43 6f 75 6e 74 3b 0d 0a 20 20 20 20 20 20 | nitPairWithDevicesCount;........ |
| ddc0 | 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 49 6e 70 75 74 44 65 76 69 63 65 5b 5d 20 73 | ..private.static.InputDevice[].s |
| dde0 | 5f 49 6e 69 74 50 61 69 72 57 69 74 68 44 65 76 69 63 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 70 | _InitPairWithDevices;..........p |
| de00 | 72 69 76 61 74 65 20 73 74 61 74 69 63 20 69 6e 74 20 73 5f 49 6e 69 74 50 6c 61 79 65 72 49 6e | rivate.static.int.s_InitPlayerIn |
| de20 | 64 65 78 20 3d 20 2d 31 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 | dex.=.-1;..........private.stati |
| de40 | 63 20 69 6e 74 20 73 5f 49 6e 69 74 53 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 20 3d 20 2d | c.int.s_InitSplitScreenIndex.=.- |
| de60 | 31 3b 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 73 74 72 69 6e | 1;..........private.static.strin |
| de80 | 67 20 73 5f 49 6e 69 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 3b 0d 0a 20 20 20 20 20 20 20 20 | g.s_InitControlScheme;.......... |
| dea0 | 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 62 6f 6f 6c 20 73 5f 44 65 73 74 72 6f 79 49 66 | internal.static.bool.s_DestroyIf |
| dec0 | 44 65 76 69 63 65 53 65 74 75 70 55 6e 73 75 63 63 65 73 73 66 75 6c 3b 0d 0a 0d 0a 20 20 20 20 | DeviceSetupUnsuccessful;........ |
| dee0 | 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 49 6e 69 74 69 61 6c 69 7a 65 41 63 74 69 6f | ....private.void.InitializeActio |
| df00 | 6e 73 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 69 66 20 | ns()..........{..............if. |
| df20 | 28 6d 5f 41 63 74 69 6f 6e 73 49 6e 69 74 69 61 6c 69 7a 65 64 29 0d 0a 20 20 20 20 20 20 20 20 | (m_ActionsInitialized).......... |
| df40 | 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 69 66 20 | ........return;..............if. |
| df60 | 28 6d 5f 41 63 74 69 6f 6e 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | (m_Actions.==.null)............. |
| df80 | 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f | .....return;................//// |
| dfa0 | 52 45 56 49 45 57 3a 20 73 68 6f 75 6c 64 20 77 65 20 2a 61 6c 77 61 79 73 2a 20 49 6e 73 74 61 | REVIEW:.should.we.*always*.Insta |
| dfc0 | 6e 74 69 61 74 65 28 29 3f 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 68 65 63 6b 20 | ntiate()?..............//.Check. |
| dfe0 | 69 66 20 77 65 20 6e 65 65 64 20 74 6f 20 64 75 70 6c 69 63 61 74 65 20 6f 75 72 20 61 63 74 69 | if.we.need.to.duplicate.our.acti |
| e000 | 6f 6e 73 20 62 79 20 6c 6f 6f 6b 69 6e 67 20 61 74 20 61 6c 6c 20 6f 74 68 65 72 20 70 6c 61 79 | ons.by.looking.at.all.other.play |
| e020 | 65 72 73 2e 20 49 66 20 61 6e 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 68 61 73 20 | ers..If.any..............//.has. |
| e040 | 74 68 65 20 73 61 6d 65 20 61 63 74 69 6f 6e 73 2c 20 64 75 70 6c 69 63 61 74 65 2e 0d 0a 20 20 | the.same.actions,.duplicate..... |
| e060 | 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 73 5f | ..........for.(var.i.=.0;.i.<.s_ |
| e080 | 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 | AllActivePlayersCount;.++i)..... |
| e0a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 | .............if.(s_AllActivePlay |
| e0c0 | 65 72 73 5b 69 5d 2e 6d 5f 41 63 74 69 6f 6e 73 20 3d 3d 20 6d 5f 41 63 74 69 6f 6e 73 20 26 26 | ers[i].m_Actions.==.m_Actions.&& |
| e0e0 | 20 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 5b 69 5d 20 21 3d 20 74 68 69 73 29 0d | .s_AllActivePlayers[i].!=.this). |
| e100 | 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 20 20 20 | .................{.............. |
| e120 | 20 20 20 20 20 20 20 20 76 61 72 20 6f 6c 64 41 63 74 69 6f 6e 73 20 3d 20 6d 5f 41 63 74 69 6f | ........var.oldActions.=.m_Actio |
| e140 | 6e 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 63 74 69 6f | ns;......................m_Actio |
| e160 | 6e 73 20 3d 20 49 6e 73 74 61 6e 74 69 61 74 65 28 6d 5f 41 63 74 69 6f 6e 73 29 3b 0d 0a 20 20 | ns.=.Instantiate(m_Actions);.... |
| e180 | 20 20 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 61 63 74 69 6f | ..................for.(var.actio |
| e1a0 | 6e 4d 61 70 20 3d 20 30 3b 20 61 63 74 69 6f 6e 4d 61 70 20 3c 20 6f 6c 64 41 63 74 69 6f 6e 73 | nMap.=.0;.actionMap.<.oldActions |
| e1c0 | 2e 61 63 74 69 6f 6e 4d 61 70 73 2e 43 6f 75 6e 74 3b 20 61 63 74 69 6f 6e 4d 61 70 2b 2b 29 0d | .actionMaps.Count;.actionMap++). |
| e1e0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 | .....................{.......... |
| e200 | 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 62 69 6e 64 69 6e 67 | ................for.(var.binding |
| e220 | 20 3d 20 30 3b 20 62 69 6e 64 69 6e 67 20 3c 20 6f 6c 64 41 63 74 69 6f 6e 73 2e 61 63 74 69 6f | .=.0;.binding.<.oldActions.actio |
| e240 | 6e 4d 61 70 73 5b 61 63 74 69 6f 6e 4d 61 70 5d 2e 62 69 6e 64 69 6e 67 73 2e 43 6f 75 6e 74 3b | nMaps[actionMap].bindings.Count; |
| e260 | 20 62 69 6e 64 69 6e 67 2b 2b 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .binding++)..................... |
| e280 | 20 20 20 20 20 20 20 20 20 6d 5f 41 63 74 69 6f 6e 73 2e 61 63 74 69 6f 6e 4d 61 70 73 5b 61 63 | .........m_Actions.actionMaps[ac |
| e2a0 | 74 69 6f 6e 4d 61 70 5d 2e 41 70 70 6c 79 42 69 6e 64 69 6e 67 4f 76 65 72 72 69 64 65 28 62 69 | tionMap].ApplyBindingOverride(bi |
| e2c0 | 6e 64 69 6e 67 2c 20 6f 6c 64 41 63 74 69 6f 6e 73 2e 61 63 74 69 6f 6e 4d 61 70 73 5b 61 63 74 | nding,.oldActions.actionMaps[act |
| e2e0 | 69 6f 6e 4d 61 70 5d 2e 62 69 6e 64 69 6e 67 73 5b 62 69 6e 64 69 6e 67 5d 29 3b 0d 0a 20 20 20 | ionMap].bindings[binding]);..... |
| e300 | 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 20 | .................}.............. |
| e320 | 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..........break;................ |
| e340 | 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 23 69 66 20 55 4e 49 54 59 5f 49 4e 50 | ..}................#if.UNITY_INP |
| e360 | 55 54 5f 53 59 53 54 45 4d 5f 45 4e 41 42 4c 45 5f 55 49 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | UT_SYSTEM_ENABLE_UI............. |
| e380 | 20 69 66 20 28 75 69 49 6e 70 75 74 4d 6f 64 75 6c 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 | .if.(uiInputModule.!=.null)..... |
| e3a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 75 69 49 6e 70 75 74 4d 6f 64 75 6c 65 2e 61 63 74 69 6f | .............uiInputModule.actio |
| e3c0 | 6e 73 41 73 73 65 74 20 3d 20 6d 5f 41 63 74 69 6f 6e 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | nsAsset.=.m_Actions;............ |
| e3e0 | 20 20 23 65 6e 64 69 66 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 20 28 | ..#endif................switch.( |
| e400 | 6d 5f 4e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 29 0d 0a 20 20 20 20 20 20 20 | m_NotificationBehavior)......... |
| e420 | 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 50 6c 61 | .....{..................case.Pla |
| e440 | 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 53 65 6e 64 4d 65 73 73 61 67 65 73 3a 0d 0a | yerNotifications.SendMessages:.. |
| e460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 50 6c 61 79 65 72 4e 6f 74 69 66 | ................case.PlayerNotif |
| e480 | 69 63 61 74 69 6f 6e 73 2e 42 72 6f 61 64 63 61 73 74 4d 65 73 73 61 67 65 73 3a 0d 0a 20 20 20 | ications.BroadcastMessages:..... |
| e4a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 73 74 61 6c 6c 4f 6e 41 63 74 69 6f 6e | .................InstallOnAction |
| e4c0 | 54 72 69 67 67 65 72 65 64 48 6f 6f 6b 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | TriggeredHook();................ |
| e4e0 | 20 20 20 20 20 20 69 66 20 28 6d 5f 41 63 74 69 6f 6e 4d 65 73 73 61 67 65 4e 61 6d 65 73 20 3d | ......if.(m_ActionMessageNames.= |
| e500 | 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | =.null)......................... |
| e520 | 20 43 61 63 68 65 4d 65 73 73 61 67 65 4e 61 6d 65 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 | .CacheMessageNames();........... |
| e540 | 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ...........break;............... |
| e560 | 20 20 20 20 20 63 61 73 65 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 49 6e | .....case.PlayerNotifications.In |
| e580 | 76 6f 6b 65 43 53 68 61 72 70 45 76 65 6e 74 73 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | vokeCSharpEvents:............... |
| e5a0 | 20 20 20 20 20 20 20 49 6e 73 74 61 6c 6c 4f 6e 41 63 74 69 6f 6e 54 72 69 67 67 65 72 65 64 48 | .......InstallOnActionTriggeredH |
| e5c0 | 6f 6f 6b 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 | ook();......................brea |
| e5e0 | 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 50 6c 61 79 65 | k;....................case.Playe |
| e600 | 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 49 6e 76 6f 6b 65 55 6e 69 74 79 45 76 65 6e 74 73 | rNotifications.InvokeUnityEvents |
| e620 | 3a 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 20 | :..................{............ |
| e640 | 20 20 20 20 20 20 20 20 20 20 2f 2f 20 48 6f 6f 6b 20 75 70 20 61 6c 6c 20 61 63 74 69 6f 6e 20 | ..........//.Hook.up.all.action. |
| e660 | 65 76 65 6e 74 73 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 | events.......................if. |
| e680 | 28 6d 5f 41 63 74 69 6f 6e 45 76 65 6e 74 73 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 | (m_ActionEvents.!=.null)........ |
| e6a0 | 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 20 20 20 | ..............{................. |
| e6c0 | 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 61 63 74 69 6f 6e 45 76 65 6e | .........foreach.(var.actionEven |
| e6e0 | 74 20 69 6e 20 6d 5f 41 63 74 69 6f 6e 45 76 65 6e 74 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | t.in.m_ActionEvents)............ |
| e700 | 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 20 20 20 | ..............{................. |
| e720 | 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 64 20 3d 20 61 63 74 69 6f 6e 45 76 65 6e | .............var.id.=.actionEven |
| e740 | 74 2e 61 63 74 69 6f 6e 49 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | t.actionId;..................... |
| e760 | 20 20 20 20 20 20 20 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 | .........if.(string.IsNullOrEmpt |
| e780 | 79 28 69 64 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | y(id)).......................... |
| e7a0 | 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 20 20 20 20 20 20 | ........continue;............... |
| e7c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 69 6e 64 20 61 63 74 69 6f 6e 20 | .................//.Find.action. |
| e7e0 | 66 6f 72 20 65 76 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | for.event....................... |
| e800 | 20 20 20 20 20 20 20 20 76 61 72 20 61 63 74 69 6f 6e 20 3d 20 6d 5f 41 63 74 69 6f 6e 73 2e 46 | ........var.action.=.m_Actions.F |
| e820 | 69 6e 64 41 63 74 69 6f 6e 28 69 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | indAction(id);.................. |
| e840 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 20 21 3d 20 6e 75 6c 6c 29 0d | ............if.(action.!=.null). |
| e860 | 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 7b 0d 0a | .............................{.. |
| e880 | 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 | ................................ |
| e8a0 | 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 72 65 61 6c 6c 79 20 77 69 73 68 20 77 65 20 68 61 64 20 61 | ////REVIEW:.really.wish.we.had.a |
| e8c0 | 20 73 69 6e 67 6c 65 20 63 61 6c 6c 62 61 63 6b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .single.callback................ |
| e8e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 2e 70 65 72 66 6f 72 6d | ..................action.perform |
| e900 | 65 64 20 2b 3d 20 61 63 74 69 6f 6e 45 76 65 6e 74 2e 49 6e 76 6f 6b 65 3b 0d 0a 20 20 20 20 20 | ed.+=.actionEvent.Invoke;....... |
| e920 | 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 61 63 74 69 6f | ...........................actio |
| e940 | 6e 2e 63 61 6e 63 65 6c 65 64 20 2b 3d 20 61 63 74 69 6f 6e 45 76 65 6e 74 2e 49 6e 76 6f 6b 65 | n.canceled.+=.actionEvent.Invoke |
| e960 | 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 20 | ;............................... |
| e980 | 20 20 20 61 63 74 69 6f 6e 2e 73 74 61 72 74 65 64 20 2b 3d 20 61 63 74 69 6f 6e 45 76 65 6e 74 | ...action.started.+=.actionEvent |
| e9a0 | 2e 49 6e 76 6f 6b 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 | .Invoke;........................ |
| e9c0 | 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 | ......}......................... |
| e9e0 | 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....................... |
| ea00 | 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 | .......{........................ |
| ea20 | 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 61 6e 6e 6f 74 20 66 69 6e 64 20 61 63 74 69 6f 6e 2e | ..........//.Cannot.find.action. |
| ea40 | 20 4c 6f 67 20 65 72 72 6f 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .Log.error...................... |
| ea60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f | .............if.(!string.IsNullO |
| ea80 | 72 45 6d 70 74 79 28 61 63 74 69 6f 6e 45 76 65 6e 74 2e 61 63 74 69 6f 6e 4e 61 6d 65 29 29 0d | rEmpty(actionEvent.actionName)). |
| eaa0 | 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 | ................................ |
| eac0 | 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 | .{.............................. |
| eae0 | 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 68 61 76 65 20 61 6e 20 61 63 74 69 6f 6e 20 6e 61 6d | ........//.We.have.an.action.nam |
| eb00 | 65 2e 20 53 68 6f 77 20 69 6e 20 6d 65 73 73 61 67 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | e..Show.in.message.............. |
| eb20 | 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 44 65 62 75 67 2e 4c | .........................Debug.L |
| eb40 | 6f 67 45 72 72 6f 72 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ogError(........................ |
| eb60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 22 43 61 6e 6e 6f 74 20 66 69 6e 64 20 | ..................$"Cannot.find. |
| eb80 | 61 63 74 69 6f 6e 20 27 7b 61 63 74 69 6f 6e 45 76 65 6e 74 2e 61 63 74 69 6f 6e 4e 61 6d 65 7d | action.'{actionEvent.actionName} |
| eba0 | 27 20 77 69 74 68 20 49 44 20 27 7b 61 63 74 69 6f 6e 45 76 65 6e 74 2e 61 63 74 69 6f 6e 49 64 | '.with.ID.'{actionEvent.actionId |
| ebc0 | 7d 27 20 69 6e 20 27 7b 6d 5f 41 63 74 69 6f 6e 73 7d 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 | }'.in.'{m_Actions}",............ |
| ebe0 | 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 74 68 | ..............................th |
| ec00 | 69 73 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 | is);............................ |
| ec20 | 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 | ......}......................... |
| ec40 | 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 20 | .........else................... |
| ec60 | 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 20 20 | ...............{................ |
| ec80 | 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 57 65 20 68 61 76 65 | ......................//.We.have |
| eca0 | 20 6e 6f 20 61 63 74 69 6f 6e 20 6e 61 6d 65 2e 20 42 65 73 74 20 77 65 20 68 61 76 65 20 69 73 | .no.action.name..Best.we.have.is |
| ecc0 | 20 49 44 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 | .ID............................. |
| ece0 | 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 45 72 72 6f 72 28 0d 0a 20 20 20 20 20 | ..........Debug.LogError(....... |
| ed00 | 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 | ................................ |
| ed20 | 20 20 20 24 22 43 61 6e 6e 6f 74 20 66 69 6e 64 20 61 63 74 69 6f 6e 20 77 69 74 68 20 49 44 20 | ...$"Cannot.find.action.with.ID. |
| ed40 | 27 7b 61 63 74 69 6f 6e 45 76 65 6e 74 2e 61 63 74 69 6f 6e 49 64 7d 27 20 69 6e 20 27 7b 6d 5f | '{actionEvent.actionId}'.in.'{m_ |
| ed60 | 41 63 74 69 6f 6e 73 7d 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | Actions}",...................... |
| ed80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 29 3b 0d 0a 20 20 20 20 | ....................this);...... |
| eda0 | 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 7d 0d 0a 20 | ............................}... |
| edc0 | 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 7d 0d 0a 20 20 | ...........................}.... |
| ede0 | 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 20 20 20 20 20 20 20 | ......................}......... |
| ee00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .............}.................. |
| ee20 | 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 | ....break;..................}... |
| ee40 | 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 6d 5f 41 63 | ...........}................m_Ac |
| ee60 | 74 69 6f 6e 73 49 6e 69 74 69 61 6c 69 7a 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 | tionsInitialized.=.true;........ |
| ee80 | 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 55 6e 69 6e | ..}............private.void.Unin |
| eea0 | 69 74 69 61 6c 69 7a 65 41 63 74 69 6f 6e 73 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 | itializeActions()..........{.... |
| eec0 | 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f 41 63 74 69 6f 6e 73 49 6e 69 74 69 61 6c 69 | ..........if.(!m_ActionsInitiali |
| eee0 | 7a 65 64 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 3b 0d 0a 20 | zed)..................return;... |
| ef00 | 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 63 74 69 6f 6e 73 20 3d 3d 20 6e 75 6c 6c | ...........if.(m_Actions.==.null |
| ef20 | 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 3b 0d 0a 0d 0a 20 20 | )..................return;...... |
| ef40 | 20 20 20 20 20 20 20 20 20 20 55 6e 69 6e 73 74 61 6c 6c 4f 6e 41 63 74 69 6f 6e 54 72 69 67 67 | ..........UninstallOnActionTrigg |
| ef60 | 65 72 65 64 48 6f 6f 6b 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d | eredHook();................if.(m |
| ef80 | 5f 4e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 20 3d 3d 20 50 6c 61 79 65 72 4e | _NotificationBehavior.==.PlayerN |
| efa0 | 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 49 6e 76 6f 6b 65 55 6e 69 74 79 45 76 65 6e 74 73 20 26 | otifications.InvokeUnityEvents.& |
| efc0 | 26 20 6d 5f 41 63 74 69 6f 6e 45 76 65 6e 74 73 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 | &.m_ActionEvents.!=.null)....... |
| efe0 | 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 66 6f 72 65 61 63 | .......{..................foreac |
| f000 | 68 20 28 76 61 72 20 61 63 74 69 6f 6e 45 76 65 6e 74 20 69 6e 20 6d 5f 41 63 74 69 6f 6e 45 76 | h.(var.actionEvent.in.m_ActionEv |
| f020 | 65 6e 74 73 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 | ents)..................{........ |
| f040 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 69 64 20 3d 20 61 63 74 69 6f 6e 45 76 65 | ..............var.id.=.actionEve |
| f060 | 6e 74 2e 61 63 74 69 6f 6e 49 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | nt.actionId;.................... |
| f080 | 20 20 69 66 20 28 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 69 64 29 29 0d | ..if.(string.IsNullOrEmpty(id)). |
| f0a0 | 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 63 6f 6e 74 69 6e 75 | .........................continu |
| f0c0 | 65 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 2f 2f 20 46 69 6e | e;........................//.Fin |
| f0e0 | 64 20 61 63 74 69 6f 6e 20 66 6f 72 20 65 76 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | d.action.for.event.............. |
| f100 | 20 20 20 20 20 20 20 20 20 76 61 72 20 61 63 74 69 6f 6e 20 3d 20 6d 5f 41 63 74 69 6f 6e 73 2e | .........var.action.=.m_Actions. |
| f120 | 46 69 6e 64 41 63 74 69 6f 6e 28 69 64 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | FindAction(id);................. |
| f140 | 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 | .....if.(action.!=.null)........ |
| f160 | 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 20 20 20 | ..............{................. |
| f180 | 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 72 65 61 6c 6c 79 20 77 69 73 68 | .........////REVIEW:.really.wish |
| f1a0 | 20 77 65 20 68 61 64 20 61 20 73 69 6e 67 6c 65 20 63 61 6c 6c 62 61 63 6b 0d 0a 20 20 20 20 20 | .we.had.a.single.callback....... |
| f1c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 2e 70 65 72 66 6f 72 | ...................action.perfor |
| f1e0 | 6d 65 64 20 2d 3d 20 61 63 74 69 6f 6e 45 76 65 6e 74 2e 49 6e 76 6f 6b 65 3b 0d 0a 20 20 20 20 | med.-=.actionEvent.Invoke;...... |
| f200 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 2e 63 61 6e 63 65 | ....................action.cance |
| f220 | 6c 65 64 20 2d 3d 20 61 63 74 69 6f 6e 45 76 65 6e 74 2e 49 6e 76 6f 6b 65 3b 0d 0a 20 20 20 20 | led.-=.actionEvent.Invoke;...... |
| f240 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 2e 73 74 61 72 74 | ....................action.start |
| f260 | 65 64 20 2d 3d 20 61 63 74 69 6f 6e 45 76 65 6e 74 2e 49 6e 76 6f 6b 65 3b 0d 0a 20 20 20 20 20 | ed.-=.actionEvent.Invoke;....... |
| f280 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...............}................ |
| f2a0 | 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 20 20 20 20 20 20 | ..}..............}.............. |
| f2c0 | 20 20 6d 5f 43 75 72 72 65 6e 74 41 63 74 69 6f 6e 4d 61 70 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 | ..m_CurrentActionMap.=.null;.... |
| f2e0 | 20 20 20 20 20 20 20 20 20 20 6d 5f 41 63 74 69 6f 6e 73 49 6e 69 74 69 61 6c 69 7a 65 64 20 3d | ..........m_ActionsInitialized.= |
| f300 | 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 | .false;..........}............pr |
| f320 | 69 76 61 74 65 20 76 6f 69 64 20 49 6e 73 74 61 6c 6c 4f 6e 41 63 74 69 6f 6e 54 72 69 67 67 65 | ivate.void.InstallOnActionTrigge |
| f340 | 72 65 64 48 6f 6f 6b 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 | redHook()..........{............ |
| f360 | 20 20 69 66 20 28 6d 5f 41 63 74 69 6f 6e 54 72 69 67 67 65 72 65 64 44 65 6c 65 67 61 74 65 20 | ..if.(m_ActionTriggeredDelegate. |
| f380 | 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 63 74 69 | ==.null)..................m_Acti |
| f3a0 | 6f 6e 54 72 69 67 67 65 72 65 64 44 65 6c 65 67 61 74 65 20 3d 20 4f 6e 41 63 74 69 6f 6e 54 72 | onTriggeredDelegate.=.OnActionTr |
| f3c0 | 69 67 67 65 72 65 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 | iggered;..............foreach.(v |
| f3e0 | 61 72 20 61 63 74 69 6f 6e 4d 61 70 20 69 6e 20 6d 5f 41 63 74 69 6f 6e 73 2e 61 63 74 69 6f 6e | ar.actionMap.in.m_Actions.action |
| f400 | 4d 61 70 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 4d 61 70 | Maps)..................actionMap |
| f420 | 2e 61 63 74 69 6f 6e 54 72 69 67 67 65 72 65 64 20 2b 3d 20 6d 5f 41 63 74 69 6f 6e 54 72 69 67 | .actionTriggered.+=.m_ActionTrig |
| f440 | 67 65 72 65 64 44 65 6c 65 67 61 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 | geredDelegate;..........}....... |
| f460 | 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 55 6e 69 6e 73 74 61 6c 6c 4f 6e 41 63 74 | .....private.void.UninstallOnAct |
| f480 | 69 6f 6e 54 72 69 67 67 65 72 65 64 48 6f 6f 6b 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 | ionTriggeredHook()..........{... |
| f4a0 | 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 63 74 69 6f 6e 54 72 69 67 67 65 72 65 64 | ...........if.(m_ActionTriggered |
| f4c0 | 44 65 6c 65 67 61 74 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | Delegate.!=.null)............... |
| f4e0 | 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 61 63 74 69 6f 6e 4d 61 70 20 69 6e 20 6d 5f 41 | ...foreach.(var.actionMap.in.m_A |
| f500 | 63 74 69 6f 6e 73 2e 61 63 74 69 6f 6e 4d 61 70 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ctions.actionMaps).............. |
| f520 | 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 4d 61 70 2e 61 63 74 69 6f 6e 54 72 69 67 67 65 72 65 | ........actionMap.actionTriggere |
| f540 | 64 20 2d 3d 20 6d 5f 41 63 74 69 6f 6e 54 72 69 67 67 65 72 65 64 44 65 6c 65 67 61 74 65 3b 0d | d.-=.m_ActionTriggeredDelegate;. |
| f560 | 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 2f 52 45 56 49 45 57 | .........}............////REVIEW |
| f580 | 3a 20 73 68 6f 75 6c 64 20 74 68 69 73 20 74 61 6b 65 20 74 68 65 20 61 63 74 69 6f 6e 20 2a 74 | :.should.this.take.the.action.*t |
| f5a0 | 79 70 65 2a 20 69 6e 74 6f 20 61 63 63 6f 75 6e 74 3f 20 65 2e 67 2e 20 68 61 76 65 20 64 69 66 | ype*.into.account?.e.g..have.dif |
| f5c0 | 66 65 72 65 6e 74 20 62 65 68 61 76 69 6f 72 20 77 68 65 6e 20 74 68 65 20 74 79 70 65 20 69 73 | ferent.behavior.when.the.type.is |
| f5e0 | 20 22 42 75 74 74 6f 6e 22 3f 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 | ."Button"?..........private.void |
| f600 | 20 4f 6e 41 63 74 69 6f 6e 54 72 69 67 67 65 72 65 64 28 49 6e 70 75 74 41 63 74 69 6f 6e 2e 43 | .OnActionTriggered(InputAction.C |
| f620 | 61 6c 6c 62 61 63 6b 43 6f 6e 74 65 78 74 20 63 6f 6e 74 65 78 74 29 0d 0a 20 20 20 20 20 20 20 | allbackContext.context)......... |
| f640 | 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f 49 6e 70 75 74 41 63 74 69 | .{..............if.(!m_InputActi |
| f660 | 76 65 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 3b 0d 0a 0d 0a | ve)..................return;.... |
| f680 | 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 73 68 6f 75 6c 64 6e 27 74 20 67 6f 20 74 | ............//.We.shouldn't.go.t |
| f6a0 | 68 72 6f 75 67 68 20 74 68 69 73 20 6d 65 74 68 6f 64 20 77 68 65 6e 20 75 73 69 6e 67 20 55 6e | hrough.this.method.when.using.Un |
| f6c0 | 69 74 79 45 76 65 6e 74 73 2e 20 57 69 74 68 20 65 76 65 6e 74 73 2c 0d 0a 20 20 20 20 20 20 20 | ityEvents..With.events,......... |
| f6e0 | 20 20 20 20 20 2f 2f 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 73 20 73 68 6f 75 6c 64 20 62 65 20 | .....//.the.callbacks.should.be. |
| f700 | 77 69 72 65 64 20 75 70 20 64 69 72 65 63 74 6c 79 20 72 61 74 68 65 72 20 74 68 61 6e 20 67 6f | wired.up.directly.rather.than.go |
| f720 | 69 6e 67 20 61 6c 6c 20 74 6f 20 74 68 69 73 20 6d 65 74 68 6f 64 2e 0d 0a 20 20 20 20 20 20 20 | ing.all.to.this.method.......... |
| f740 | 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 6d 5f 4e 6f 74 69 66 69 63 61 74 69 6f 6e | .....Debug.Assert(m_Notification |
| f760 | 42 65 68 61 76 69 6f 72 20 21 3d 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e | Behavior.!=.PlayerNotifications. |
| f780 | 49 6e 76 6f 6b 65 55 6e 69 74 79 45 76 65 6e 74 73 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | InvokeUnityEvents,.............. |
| f7a0 | 20 20 20 20 22 4f 6e 41 63 74 69 6f 6e 54 72 69 67 67 65 72 65 64 20 63 61 6c 6c 62 61 63 6b 20 | ...."OnActionTriggered.callback. |
| f7c0 | 73 68 6f 75 6c 64 20 6e 6f 74 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 20 69 66 20 6e 6f 74 69 66 | should.not.be.installed.if.notif |
| f7e0 | 69 63 61 74 69 6f 6e 20 62 65 68 61 76 69 6f 72 20 69 73 20 73 65 74 20 74 6f 20 49 6e 76 6f 6b | ication.behavior.is.set.to.Invok |
| f800 | 65 55 6e 69 74 79 45 76 65 6e 74 73 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 | eUnityEvents");................s |
| f820 | 77 69 74 63 68 20 28 6d 5f 4e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 29 0d 0a | witch.(m_NotificationBehavior).. |
| f840 | 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 63 | ............{..................c |
| f860 | 61 73 65 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 49 6e 76 6f 6b 65 43 53 | ase.PlayerNotifications.InvokeCS |
| f880 | 68 61 72 70 45 76 65 6e 74 73 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | harpEvents:..................... |
| f8a0 | 20 44 65 6c 65 67 61 74 65 48 65 6c 70 65 72 73 2e 49 6e 76 6f 6b 65 43 61 6c 6c 62 61 63 6b 73 | .DelegateHelpers.InvokeCallbacks |
| f8c0 | 53 61 66 65 28 72 65 66 20 6d 5f 41 63 74 69 6f 6e 54 72 69 67 67 65 72 65 64 43 61 6c 6c 62 61 | Safe(ref.m_ActionTriggeredCallba |
| f8e0 | 63 6b 73 2c 20 63 6f 6e 74 65 78 74 2c 20 22 50 6c 61 79 65 72 49 6e 70 75 74 2e 6f 6e 41 63 74 | cks,.context,."PlayerInput.onAct |
| f900 | 69 6f 6e 54 72 69 67 67 65 72 65 64 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ionTriggered");................. |
| f920 | 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 | .....break;....................c |
| f940 | 61 73 65 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 42 72 6f 61 64 63 61 73 | ase.PlayerNotifications.Broadcas |
| f960 | 74 4d 65 73 73 61 67 65 73 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 | tMessages:..................case |
| f980 | 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 53 65 6e 64 4d 65 73 73 61 67 65 | .PlayerNotifications.SendMessage |
| f9a0 | 73 3a 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 41 54 4d 20 77 | s:......................//.ATM.w |
| f9c0 | 65 20 6f 6e 6c 79 20 63 61 72 65 20 61 62 6f 75 74 20 60 70 65 72 66 6f 72 6d 65 64 60 20 61 6e | e.only.care.about.`performed`.an |
| f9e0 | 64 2c 20 69 6e 20 74 68 65 20 63 61 73 65 20 6f 66 20 76 61 6c 75 65 20 61 63 74 69 6f 6e 73 2c | d,.in.the.case.of.value.actions, |
| fa00 | 20 60 63 61 6e 63 65 6c 65 64 60 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .`canceled`..................... |
| fa20 | 20 20 76 61 72 20 61 63 74 69 6f 6e 20 3d 20 63 6f 6e 74 65 78 74 2e 61 63 74 69 6f 6e 3b 0d 0a | ..var.action.=.context.action;.. |
| fa40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 28 63 6f 6e 74 65 78 | ....................if.(!(contex |
| fa60 | 74 2e 70 65 72 66 6f 72 6d 65 64 20 7c 7c 20 28 63 6f 6e 74 65 78 74 2e 63 61 6e 63 65 6c 65 64 | t.performed.||.(context.canceled |
| fa80 | 20 26 26 20 61 63 74 69 6f 6e 2e 74 79 70 65 20 3d 3d 20 49 6e 70 75 74 41 63 74 69 6f 6e 54 79 | .&&.action.type.==.InputActionTy |
| faa0 | 70 65 2e 56 61 6c 75 65 29 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | pe.Value)))..................... |
| fac0 | 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .....return;.................... |
| fae0 | 20 20 20 20 2f 2f 20 46 69 6e 64 20 6d 65 73 73 61 67 65 20 6e 61 6d 65 20 66 6f 72 20 61 63 74 | ....//.Find.message.name.for.act |
| fb00 | 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 69 66 20 28 6d 5f | ion.......................if.(m_ |
| fb20 | 41 63 74 69 6f 6e 4d 65 73 73 61 67 65 4e 61 6d 65 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 | ActionMessageNames.==.null)..... |
| fb40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 43 61 63 68 65 4d 65 73 73 61 67 | .....................CacheMessag |
| fb60 | 65 4e 61 6d 65 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 | eNames();......................v |
| fb80 | 61 72 20 6d 65 73 73 61 67 65 4e 61 6d 65 20 3d 20 6d 5f 41 63 74 69 6f 6e 4d 65 73 73 61 67 65 | ar.messageName.=.m_ActionMessage |
| fba0 | 4e 61 6d 65 73 5b 61 63 74 69 6f 6e 2e 6d 5f 49 64 5d 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 | Names[action.m_Id];............. |
| fbc0 | 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 43 61 63 68 65 20 76 61 6c 75 65 2e 0d 0a 20 20 20 20 | ...........//.Cache.value....... |
| fbe0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 49 6e 70 75 74 56 61 6c 75 65 | ................if.(m_InputValue |
| fc00 | 4f 62 6a 65 63 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | Object.==.null)................. |
| fc20 | 20 20 20 20 20 20 20 20 20 6d 5f 49 6e 70 75 74 56 61 6c 75 65 4f 62 6a 65 63 74 20 3d 20 6e 65 | .........m_InputValueObject.=.ne |
| fc40 | 77 20 49 6e 70 75 74 56 61 6c 75 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | w.InputValue();................. |
| fc60 | 20 20 20 20 20 6d 5f 49 6e 70 75 74 56 61 6c 75 65 4f 62 6a 65 63 74 2e 6d 5f 43 6f 6e 74 65 78 | .....m_InputValueObject.m_Contex |
| fc80 | 74 20 3d 20 63 6f 6e 74 65 78 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | t.=.context;.................... |
| fca0 | 20 20 20 20 2f 2f 20 53 65 6e 64 20 6d 65 73 73 61 67 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 | ....//.Send.message............. |
| fcc0 | 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 4e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 | ..........if.(m_NotificationBeha |
| fce0 | 76 69 6f 72 20 3d 3d 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 42 72 6f 61 | vior.==.PlayerNotifications.Broa |
| fd00 | 64 63 61 73 74 4d 65 73 73 61 67 65 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | dcastMessages).................. |
| fd20 | 20 20 20 20 20 20 20 20 42 72 6f 61 64 63 61 73 74 4d 65 73 73 61 67 65 28 6d 65 73 73 61 67 65 | ........BroadcastMessage(message |
| fd40 | 4e 61 6d 65 2c 20 6d 5f 49 6e 70 75 74 56 61 6c 75 65 4f 62 6a 65 63 74 2c 20 53 65 6e 64 4d 65 | Name,.m_InputValueObject,.SendMe |
| fd60 | 73 73 61 67 65 4f 70 74 69 6f 6e 73 2e 44 6f 6e 74 52 65 71 75 69 72 65 52 65 63 65 69 76 65 72 | ssageOptions.DontRequireReceiver |
| fd80 | 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 | );......................else.... |
| fda0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 65 6e 64 4d 65 73 73 61 67 | ......................SendMessag |
| fdc0 | 65 28 6d 65 73 73 61 67 65 4e 61 6d 65 2c 20 6d 5f 49 6e 70 75 74 56 61 6c 75 65 4f 62 6a 65 63 | e(messageName,.m_InputValueObjec |
| fde0 | 74 2c 20 53 65 6e 64 4d 65 73 73 61 67 65 4f 70 74 69 6f 6e 73 2e 44 6f 6e 74 52 65 71 75 69 72 | t,.SendMessageOptions.DontRequir |
| fe00 | 65 52 65 63 65 69 76 65 72 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | eReceiver);..................... |
| fe20 | 20 20 20 2f 2f 20 52 65 73 65 74 20 63 6f 6e 74 65 78 74 20 73 6f 20 63 61 6c 6c 69 6e 67 20 47 | ...//.Reset.context.so.calling.G |
| fe40 | 65 74 28 29 20 77 69 6c 6c 20 72 65 73 75 6c 74 20 69 6e 20 61 6e 20 65 78 63 65 70 74 69 6f 6e | et().will.result.in.an.exception |
| fe60 | 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6e 70 75 74 56 61 | .......................m_InputVa |
| fe80 | 6c 75 65 4f 62 6a 65 63 74 2e 6d 5f 43 6f 6e 74 65 78 74 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 | lueObject.m_Context.=.null;..... |
| fea0 | 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 20 20 20 20 20 20 20 | .................break;......... |
| fec0 | 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 70 72 69 | .....}..........}............pri |
| fee0 | 76 61 74 65 20 76 6f 69 64 20 43 61 63 68 65 4d 65 73 73 61 67 65 4e 61 6d 65 73 28 29 0d 0a 20 | vate.void.CacheMessageNames()... |
| ff00 | 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 63 74 69 | .......{..............if.(m_Acti |
| ff20 | 6f 6e 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 | ons.==.null)..................re |
| ff40 | 74 75 72 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 63 74 69 6f | turn;................if.(m_Actio |
| ff60 | 6e 4d 65 73 73 61 67 65 4e 61 6d 65 73 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 | nMessageNames.!=.null).......... |
| ff80 | 20 20 20 20 20 20 20 20 6d 5f 41 63 74 69 6f 6e 4d 65 73 73 61 67 65 4e 61 6d 65 73 2e 43 6c 65 | ........m_ActionMessageNames.Cle |
| ffa0 | 61 72 28 29 3b 0d 0a 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 | ar();..............else......... |
| ffc0 | 20 20 20 20 20 20 20 20 20 6d 5f 41 63 74 69 6f 6e 4d 65 73 73 61 67 65 4e 61 6d 65 73 20 3d 20 | .........m_ActionMessageNames.=. |
| ffe0 | 6e 65 77 20 44 69 63 74 69 6f 6e 61 72 79 3c 73 74 72 69 6e 67 2c 20 73 74 72 69 6e 67 3e 28 29 | new.Dictionary<string,.string>() |
| 10000 | 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 61 63 | ;................foreach.(var.ac |
| 10020 | 74 69 6f 6e 20 69 6e 20 6d 5f 41 63 74 69 6f 6e 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | tion.in.m_Actions).............. |
| 10040 | 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 63 74 69 6f 6e 2e 4d 61 6b 65 53 75 | {..................action.MakeSu |
| 10060 | 72 65 49 64 49 73 49 6e 50 6c 61 63 65 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | reIdIsInPlace();................ |
| 10080 | 20 20 20 20 76 61 72 20 6e 61 6d 65 20 3d 20 43 53 68 61 72 70 43 6f 64 65 48 65 6c 70 65 72 73 | ....var.name.=.CSharpCodeHelpers |
| 100a0 | 2e 4d 61 6b 65 54 79 70 65 4e 61 6d 65 28 61 63 74 69 6f 6e 2e 6e 61 6d 65 29 3b 0d 0a 20 20 20 | .MakeTypeName(action.name);..... |
| 100c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 63 74 69 6f 6e 4d 65 73 73 61 67 65 4e 61 6d 65 | .............m_ActionMessageName |
| 100e0 | 73 5b 61 63 74 69 6f 6e 2e 6d 5f 49 64 5d 20 3d 20 22 4f 6e 22 20 2b 20 6e 61 6d 65 3b 0d 0a 20 | s[action.m_Id].=."On".+.name;... |
| 10100 | 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 | ...........}..........}......... |
| 10120 | 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 43 6c 65 61 72 43 61 63 68 65 73 28 29 0d 0a 20 | ...private.void.ClearCaches()... |
| 10140 | 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f | .......{..........}............/ |
| 10160 | 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 49 6e 69 74 69 61 | //.<summary>..........///.Initia |
| 10180 | 6c 69 7a 65 20 3c 73 65 65 20 63 72 65 66 3d 22 75 73 65 72 22 2f 3e 20 61 6e 64 20 3c 73 65 65 | lize.<see.cref="user"/>.and.<see |
| 101a0 | 20 63 72 65 66 3d 22 64 65 76 69 63 65 73 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 | .cref="devices"/>...........///. |
| 101c0 | 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 | </summary>..........private.void |
| 101e0 | 20 41 73 73 69 67 6e 55 73 65 72 41 6e 64 44 65 76 69 63 65 73 28 29 0d 0a 20 20 20 20 20 20 20 | .AssignUserAndDevices()......... |
| 10200 | 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 77 65 20 61 6c 72 65 61 64 79 | .{..............//.If.we.already |
| 10220 | 20 68 61 76 65 20 61 20 75 73 65 72 20 61 74 20 74 68 69 73 20 70 6f 69 6e 74 2c 20 63 6c 65 61 | .have.a.user.at.this.point,.clea |
| 10240 | 72 20 6f 75 74 20 61 6c 6c 20 69 74 73 20 70 61 69 72 65 64 20 64 65 76 69 63 65 73 0d 0a 20 20 | r.out.all.its.paired.devices.... |
| 10260 | 20 20 20 20 20 20 20 20 20 20 2f 2f 20 74 6f 20 73 74 61 72 74 20 74 68 65 20 70 61 69 72 69 6e | ..........//.to.start.the.pairin |
| 10280 | 67 20 70 72 6f 63 65 73 73 20 66 72 6f 6d 20 73 63 72 61 74 63 68 2e 0d 0a 20 20 20 20 20 20 20 | g.process.from.scratch.......... |
| 102a0 | 20 20 20 20 20 69 66 20 28 6d 5f 49 6e 70 75 74 55 73 65 72 2e 76 61 6c 69 64 29 0d 0a 20 20 20 | .....if.(m_InputUser.valid)..... |
| 102c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6e 70 75 74 55 73 65 72 2e 55 6e 70 61 69 72 44 | .............m_InputUser.UnpairD |
| 102e0 | 65 76 69 63 65 73 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 6c 6c 20 | evices();................//.All. |
| 10300 | 6f 75 72 20 69 6e 70 75 74 20 67 6f 65 73 20 74 68 72 6f 75 67 68 20 61 63 74 69 6f 6e 73 20 73 | our.input.goes.through.actions.s |
| 10320 | 6f 20 74 68 65 72 65 27 73 20 6e 6f 20 70 6f 69 6e 74 20 73 65 74 74 69 6e 67 0d 0a 20 20 20 20 | o.there's.no.point.setting...... |
| 10340 | 20 20 20 20 20 20 20 20 2f 2f 20 61 6e 79 74 68 69 6e 67 20 75 70 20 69 66 20 77 65 20 68 61 76 | ........//.anything.up.if.we.hav |
| 10360 | 65 20 6e 6f 6e 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 63 74 69 6f | e.none...............if.(m_Actio |
| 10380 | 6e 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 | ns.==.null)..............{...... |
| 103a0 | 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 77 65 20 68 61 76 65 20 64 65 76 69 63 65 | ............//.If.we.have.device |
| 103c0 | 73 20 77 65 20 61 72 65 20 6d 65 61 6e 74 20 74 6f 20 70 61 69 72 20 77 69 74 68 2c 20 64 6f 20 | s.we.are.meant.to.pair.with,.do. |
| 103e0 | 73 6f 2e 20 20 4f 74 68 65 72 77 69 73 65 2c 20 64 6f 6e 27 74 0d 0a 20 20 20 20 20 20 20 20 20 | so...Otherwise,.don't........... |
| 10400 | 20 20 20 20 20 20 20 2f 2f 20 64 6f 20 61 6e 79 74 68 69 6e 67 20 61 73 20 77 65 20 64 6f 6e 27 | .......//.do.anything.as.we.don' |
| 10420 | 74 20 6b 6e 6f 77 20 77 68 61 74 20 6b 69 6e 64 20 6f 66 20 69 6e 70 75 74 20 74 6f 20 6c 6f 6f | t.know.what.kind.of.input.to.loo |
| 10440 | 6b 20 66 6f 72 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 5f 49 6e | k.for...................if.(s_In |
| 10460 | 69 74 50 61 69 72 57 69 74 68 44 65 76 69 63 65 73 43 6f 75 6e 74 20 3e 20 30 29 0d 0a 20 20 20 | itPairWithDevicesCount.>.0)..... |
| 10480 | 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 | .............{.................. |
| 104a0 | 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 73 5f 49 6e 69 74 50 61 | ....for.(var.i.=.0;.i.<.s_InitPa |
| 104c0 | 69 72 57 69 74 68 44 65 76 69 63 65 73 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 | irWithDevicesCount;.++i)........ |
| 104e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6e 70 75 74 55 73 65 72 20 3d 20 | ..................m_InputUser.=. |
| 10500 | 49 6e 70 75 74 55 73 65 72 2e 50 65 72 66 6f 72 6d 50 61 69 72 69 6e 67 57 69 74 68 44 65 76 69 | InputUser.PerformPairingWithDevi |
| 10520 | 63 65 28 73 5f 49 6e 69 74 50 61 69 72 57 69 74 68 44 65 76 69 63 65 73 5b 69 5d 2c 20 6d 5f 49 | ce(s_InitPairWithDevices[i],.m_I |
| 10540 | 6e 70 75 74 55 73 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 | nputUser);..................}... |
| 10560 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ...............else............. |
| 10580 | 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 2f 2f 20 4d | .....{......................//.M |
| 105a0 | 61 6b 65 20 73 75 72 65 20 75 73 65 72 20 69 73 20 69 6e 76 61 6c 69 64 2e 0d 0a 20 20 20 20 20 | ake.sure.user.is.invalid........ |
| 105c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6e 70 75 74 55 73 65 72 20 3d 20 6e 65 77 | ...............m_InputUser.=.new |
| 105e0 | 20 49 6e 70 75 74 55 73 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d | .InputUser();..................} |
| 10600 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 | ....................return;..... |
| 10620 | 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 2f 2f 20 49 66 20 | .........}................//.If. |
| 10640 | 77 65 20 68 61 76 65 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 2c 20 74 72 79 20 74 6f 20 | we.have.control.schemes,.try.to. |
| 10660 | 66 69 6e 64 20 74 68 65 20 6f 6e 65 20 77 65 20 73 68 6f 75 6c 64 20 75 73 65 2e 0d 0a 20 20 20 | find.the.one.we.should.use...... |
| 10680 | 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 63 74 69 6f 6e 73 2e 63 6f 6e 74 72 6f 6c 53 63 | .........if.(m_Actions.controlSc |
| 106a0 | 68 65 6d 65 73 2e 43 6f 75 6e 74 20 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d | hemes.Count.>.0)..............{. |
| 106c0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e | .................if.(!string.IsN |
| 106e0 | 75 6c 6c 4f 72 45 6d 70 74 79 28 73 5f 49 6e 69 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 29 29 | ullOrEmpty(s_InitControlScheme)) |
| 10700 | 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 20 20 | ..................{............. |
| 10720 | 20 20 20 20 20 20 20 20 20 2f 2f 20 57 65 27 76 65 20 62 65 65 6e 20 67 69 76 65 6e 20 61 20 63 | .........//.We've.been.given.a.c |
| 10740 | 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 74 6f 20 69 6e 69 74 69 61 6c 69 7a 65 20 74 68 69 73 | ontrol.scheme.to.initialize.this |
| 10760 | 2e 20 54 72 79 20 74 68 61 74 20 6f 6e 65 20 61 6e 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ..Try.that.one.and.............. |
| 10780 | 20 20 20 20 20 20 20 20 2f 2f 20 74 68 61 74 20 6f 6e 65 20 6f 6e 6c 79 2e 20 4d 69 67 68 74 20 | ........//.that.one.only..Might. |
| 107a0 | 6d 65 61 6e 20 77 65 20 65 6e 64 20 75 70 20 77 69 74 68 20 6d 69 73 73 69 6e 67 20 64 65 76 69 | mean.we.end.up.with.missing.devi |
| 107c0 | 63 65 73 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 | ces.........................var. |
| 107e0 | 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 20 3d 20 6d 5f 41 63 74 69 6f 6e 73 2e 46 69 6e 64 43 6f | controlScheme.=.m_Actions.FindCo |
| 10800 | 6e 74 72 6f 6c 53 63 68 65 6d 65 28 73 5f 49 6e 69 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 29 | ntrolScheme(s_InitControlScheme) |
| 10820 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6e 74 72 | ;......................if.(contr |
| 10840 | 6f 6c 53 63 68 65 6d 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | olScheme.==.null)............... |
| 10860 | 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 | .......{........................ |
| 10880 | 20 20 44 65 62 75 67 2e 4c 6f 67 45 72 72 6f 72 28 24 22 4e 6f 20 63 6f 6e 74 72 6f 6c 20 73 63 | ..Debug.LogError($"No.control.sc |
| 108a0 | 68 65 6d 65 20 27 7b 73 5f 49 6e 69 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 7d 27 20 69 6e 20 | heme.'{s_InitControlScheme}'.in. |
| 108c0 | 27 7b 6d 5f 41 63 74 69 6f 6e 73 7d 27 22 2c 20 74 68 69 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 | '{m_Actions}'",.this);.......... |
| 108e0 | 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ............}................... |
| 10900 | 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 7b 0d 0a | ...else......................{.. |
| 10920 | 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 79 54 6f 41 63 74 | ........................TryToAct |
| 10940 | 69 76 61 74 65 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 28 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 | ivateControlScheme(controlScheme |
| 10960 | 2e 56 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d | .Value);......................}. |
| 10980 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .................}.............. |
| 109a0 | 20 20 20 20 65 6c 73 65 20 69 66 20 28 21 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 | ....else.if.(!string.IsNullOrEmp |
| 109c0 | 74 79 28 6d 5f 44 65 66 61 75 6c 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 29 29 0d 0a 20 20 20 | ty(m_DefaultControlScheme))..... |
| 109e0 | 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 | .............{.................. |
| 10a00 | 20 20 20 20 2f 2f 20 54 68 65 72 65 27 73 20 61 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 | ....//.There's.a.control.scheme. |
| 10a20 | 77 65 20 73 68 6f 75 6c 64 20 74 72 79 20 62 79 20 64 65 66 61 75 6c 74 2e 0d 0a 0d 0a 20 20 20 | we.should.try.by.default........ |
| 10a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 53 63 68 65 | .................var.controlSche |
| 10a60 | 6d 65 20 3d 20 6d 5f 41 63 74 69 6f 6e 73 2e 46 69 6e 64 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 | me.=.m_Actions.FindControlScheme |
| 10a80 | 28 6d 5f 44 65 66 61 75 6c 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 29 3b 0d 0a 20 20 20 20 20 | (m_DefaultControlScheme);....... |
| 10aa0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 | ...............if.(controlScheme |
| 10ac0 | 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b | .==.null)......................{ |
| 10ae0 | 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 44 65 62 75 67 2e | ..........................Debug. |
| 10b00 | 4c 6f 67 45 72 72 6f 72 28 24 22 43 61 6e 6e 6f 74 20 66 69 6e 64 20 64 65 66 61 75 6c 74 20 63 | LogError($"Cannot.find.default.c |
| 10b20 | 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 27 7b 6d 5f 44 65 66 61 75 6c 74 43 6f 6e 74 72 6f 6c | ontrol.scheme.'{m_DefaultControl |
| 10b40 | 53 63 68 65 6d 65 7d 27 20 69 6e 20 27 7b 6d 5f 41 63 74 69 6f 6e 73 7d 27 22 2c 20 74 68 69 73 | Scheme}'.in.'{m_Actions}'",.this |
| 10b60 | 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 | );......................}....... |
| 10b80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ...............else............. |
| 10ba0 | 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .........{...................... |
| 10bc0 | 20 20 20 20 54 72 79 54 6f 41 63 74 69 76 61 74 65 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 28 63 | ....TryToActivateControlScheme(c |
| 10be0 | 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 2e 56 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 | ontrolScheme.Value);............ |
| 10c00 | 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 7d 0d 0a | ..........}..................}.. |
| 10c20 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 77 65 20 64 69 64 20 6e | ..................//.If.we.did.n |
| 10c40 | 6f 74 20 65 6e 64 20 75 70 20 77 69 74 68 20 61 20 75 73 61 62 6c 65 20 73 63 68 65 6d 65 20 62 | ot.end.up.with.a.usable.scheme.b |
| 10c60 | 79 20 6e 6f 77 20 62 75 74 20 77 65 27 76 65 20 62 65 65 6e 20 67 69 76 65 6e 20 64 65 76 69 63 | y.now.but.we've.been.given.devic |
| 10c80 | 65 73 20 74 6f 20 70 61 69 72 20 77 69 74 68 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | es.to.pair.with,................ |
| 10ca0 | 20 20 2f 2f 20 73 65 61 72 63 68 20 66 6f 72 20 61 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 | ..//.search.for.a.control.scheme |
| 10cc0 | 20 6d 61 74 63 68 69 6e 67 20 74 68 65 20 67 69 76 65 6e 20 64 65 76 69 63 65 73 2e 0d 0a 20 20 | .matching.the.given.devices..... |
| 10ce0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 5f 49 6e 69 74 50 61 69 72 57 69 74 68 | ..............if.(s_InitPairWith |
| 10d00 | 44 65 76 69 63 65 73 43 6f 75 6e 74 20 3e 20 30 20 26 26 20 28 21 6d 5f 49 6e 70 75 74 55 73 65 | DevicesCount.>.0.&&.(!m_InputUse |
| 10d20 | 72 2e 76 61 6c 69 64 20 7c 7c 20 6d 5f 49 6e 70 75 74 55 73 65 72 2e 63 6f 6e 74 72 6f 6c 53 63 | r.valid.||.m_InputUser.controlSc |
| 10d40 | 68 65 6d 65 20 3d 3d 20 6e 75 6c 6c 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | heme.==.null)).................. |
| 10d60 | 7b 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 54 68 65 20 64 65 | {......................//.The.de |
| 10d80 | 76 69 63 65 73 20 77 65 27 76 65 20 62 65 65 6e 20 67 69 76 65 6e 20 6d 61 79 20 6e 6f 74 20 62 | vices.we've.been.given.may.not.b |
| 10da0 | 65 20 61 6c 6c 20 74 68 65 20 64 65 76 69 63 65 73 20 72 65 71 75 69 72 65 64 20 74 6f 20 73 61 | e.all.the.devices.required.to.sa |
| 10dc0 | 74 69 73 66 79 20 61 20 67 69 76 65 6e 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 73 6f 20 | tisfy.a.given.control.scheme.so. |
| 10de0 | 77 65 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 77 61 6e 74 20 | we......................//.want. |
| 10e00 | 74 6f 20 70 69 63 6b 20 61 6e 79 20 6f 6e 65 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 74 | to.pick.any.one.control.scheme.t |
| 10e20 | 68 61 74 20 69 73 20 74 68 65 20 62 65 73 74 20 6d 61 74 63 68 20 66 6f 72 20 74 68 65 20 64 65 | hat.is.the.best.match.for.the.de |
| 10e40 | 76 69 63 65 73 20 77 65 20 68 61 76 65 20 72 65 67 61 72 64 6c 65 73 73 20 6f 66 20 77 68 65 74 | vices.we.have.regardless.of.whet |
| 10e60 | 68 65 72 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 77 65 27 6c | her......................//.we'l |
| 10e80 | 6c 20 6e 65 65 64 20 61 64 64 69 74 69 6f 6e 61 6c 20 64 65 76 69 63 65 73 2e 20 54 72 79 54 6f | l.need.additional.devices..TryTo |
| 10ea0 | 41 63 74 69 76 61 74 65 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 20 77 69 6c 6c 20 74 61 6b 65 20 | ActivateControlScheme.will.take. |
| 10ec0 | 63 61 72 65 20 6f 66 20 74 68 61 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | care.of.that.................... |
| 10ee0 | 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 20 3d 20 49 6e 70 75 74 43 6f 6e 74 | ...var.controlScheme.=.InputCont |
| 10f00 | 72 6f 6c 53 63 68 65 6d 65 2e 46 69 6e 64 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 46 6f 72 44 65 | rolScheme.FindControlSchemeForDe |
| 10f20 | 76 69 63 65 73 28 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 | vices(.......................... |
| 10f40 | 6e 65 77 20 52 65 61 64 4f 6e 6c 79 41 72 72 61 79 3c 49 6e 70 75 74 44 65 76 69 63 65 3e 28 73 | new.ReadOnlyArray<InputDevice>(s |
| 10f60 | 5f 49 6e 69 74 50 61 69 72 57 69 74 68 44 65 76 69 63 65 73 2c 20 30 2c 20 73 5f 49 6e 69 74 50 | _InitPairWithDevices,.0,.s_InitP |
| 10f80 | 61 69 72 57 69 74 68 44 65 76 69 63 65 73 43 6f 75 6e 74 29 2c 20 6d 5f 41 63 74 69 6f 6e 73 2e | airWithDevicesCount),.m_Actions. |
| 10fa0 | 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 73 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | controlSchemes,................. |
| 10fc0 | 20 20 20 20 20 20 20 20 20 61 6c 6c 6f 77 55 6e 73 75 63 63 65 73 66 75 6c 4d 61 74 63 68 3a 20 | .........allowUnsuccesfulMatch:. |
| 10fe0 | 74 72 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 | true);......................if.( |
| 11000 | 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 | controlScheme.!=.null).......... |
| 11020 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 72 79 54 6f 41 63 74 69 76 61 74 65 43 6f 6e | ................TryToActivateCon |
| 11040 | 74 72 6f 6c 53 63 68 65 6d 65 28 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 2e 56 61 6c 75 65 29 3b | trolScheme(controlScheme.Value); |
| 11060 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ..................}............. |
| 11080 | 20 20 20 20 20 2f 2f 20 49 66 20 77 65 20 64 6f 6e 27 74 20 68 61 76 65 20 61 20 77 6f 72 6b 69 | .....//.If.we.don't.have.a.worki |
| 110a0 | 6e 67 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 62 79 20 6e 6f 77 20 61 6e 64 20 77 65 20 | ng.control.scheme.by.now.and.we. |
| 110c0 | 68 61 76 65 6e 27 74 20 62 65 65 6e 20 69 6e 73 74 72 75 63 74 65 64 20 74 6f 20 75 73 65 0d 0a | haven't.been.instructed.to.use.. |
| 110e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 6f 6e 65 20 73 70 65 63 69 66 69 63 20 | ................//.one.specific. |
| 11100 | 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 2c 20 74 72 79 20 65 61 63 68 20 6f 6e 65 20 69 6e 20 | control.scheme,.try.each.one.in. |
| 11120 | 74 68 65 20 61 73 73 65 74 20 6f 6e 65 20 61 66 74 65 72 20 74 68 65 20 6f 74 68 65 72 20 75 6e | the.asset.one.after.the.other.un |
| 11140 | 74 69 6c 20 77 65 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 65 69 74 68 65 | til.we..................//.eithe |
| 11160 | 72 20 66 69 6e 64 20 6f 6e 65 20 77 65 20 63 61 6e 20 75 73 65 20 6f 72 20 72 75 6e 20 6f 75 74 | r.find.one.we.can.use.or.run.out |
| 11180 | 20 6f 66 20 6f 70 74 69 6f 6e 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c | .of.options...................el |
| 111a0 | 73 65 20 69 66 20 28 28 21 6d 5f 49 6e 70 75 74 55 73 65 72 2e 76 61 6c 69 64 20 7c 7c 20 6d 5f | se.if.((!m_InputUser.valid.||.m_ |
| 111c0 | 49 6e 70 75 74 55 73 65 72 2e 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 20 3d 3d 20 6e 75 6c 6c 29 | InputUser.controlScheme.==.null) |
| 111e0 | 20 26 26 20 73 74 72 69 6e 67 2e 49 73 4e 75 6c 6c 4f 72 45 6d 70 74 79 28 73 5f 49 6e 69 74 43 | .&&.string.IsNullOrEmpty(s_InitC |
| 11200 | 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ontrolScheme)).................. |
| 11220 | 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 73 69 6e 67 20 28 76 61 | {......................using.(va |
| 11240 | 72 20 61 76 61 69 6c 61 62 6c 65 44 65 76 69 63 65 73 20 3d 20 49 6e 70 75 74 55 73 65 72 2e 47 | r.availableDevices.=.InputUser.G |
| 11260 | 65 74 55 6e 70 61 69 72 65 64 49 6e 70 75 74 44 65 76 69 63 65 73 28 29 29 0d 0a 20 20 20 20 20 | etUnpairedInputDevices())....... |
| 11280 | 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 20 20 | ...............{................ |
| 112a0 | 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 20 3d 20 49 6e | ..........var.controlScheme.=.In |
| 112c0 | 70 75 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 2e 46 69 6e 64 43 6f 6e 74 72 6f 6c 53 63 68 65 | putControlScheme.FindControlSche |
| 112e0 | 6d 65 46 6f 72 44 65 76 69 63 65 73 28 61 76 61 69 6c 61 62 6c 65 44 65 76 69 63 65 73 2c 20 6d | meForDevices(availableDevices,.m |
| 11300 | 5f 41 63 74 69 6f 6e 73 2e 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 73 29 3b 0d 0a 20 20 20 20 20 | _Actions.controlSchemes);....... |
| 11320 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 6f 6e 74 72 6f 6c 53 63 | ...................if.(controlSc |
| 11340 | 68 65 6d 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | heme.!=.null)................... |
| 11360 | 20 20 20 20 20 20 20 20 20 20 20 54 72 79 54 6f 41 63 74 69 76 61 74 65 43 6f 6e 74 72 6f 6c 53 | ...........TryToActivateControlS |
| 11380 | 63 68 65 6d 65 28 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 2e 56 61 6c 75 65 29 3b 0d 0a 20 20 20 | cheme(controlScheme.Value);..... |
| 113a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .................}.............. |
| 113c0 | 20 20 20 20 7d 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 | ....}..............}............ |
| 113e0 | 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..............{........... |
| 11400 | 20 20 20 20 20 20 20 2f 2f 20 54 68 65 72 65 27 73 20 6e 6f 20 63 6f 6e 74 72 6f 6c 20 73 63 68 | .......//.There's.no.control.sch |
| 11420 | 65 6d 65 73 20 69 6e 20 74 68 65 20 61 73 73 65 74 2e 20 49 66 20 77 65 27 76 65 20 62 65 65 6e | emes.in.the.asset..If.we've.been |
| 11440 | 20 67 69 76 65 6e 20 61 20 73 65 74 20 6f 66 20 64 65 76 69 63 65 73 2c 0d 0a 20 20 20 20 20 20 | .given.a.set.of.devices,........ |
| 11460 | 20 20 20 20 20 20 20 20 20 20 2f 2f 20 77 65 20 72 75 6e 20 77 69 74 68 20 74 68 6f 73 65 20 28 | ..........//.we.run.with.those.( |
| 11480 | 72 65 67 61 72 64 6c 65 73 73 20 6f 66 20 77 68 65 74 68 65 72 20 74 68 65 72 65 27 73 20 62 69 | regardless.of.whether.there's.bi |
| 114a0 | 6e 64 69 6e 67 73 20 66 6f 72 20 74 68 65 6d 20 69 6e 20 74 68 65 20 61 63 74 69 6f 6e 73 20 6f | ndings.for.them.in.the.actions.o |
| 114c0 | 72 20 6e 6f 74 29 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 77 | r.not)...................//.If.w |
| 114e0 | 65 20 68 61 76 65 6e 27 74 20 62 65 65 6e 20 67 69 76 65 6e 20 61 6e 79 20 64 65 76 69 63 65 73 | e.haven't.been.given.any.devices |
| 11500 | 2c 20 77 65 20 67 6f 20 74 68 72 6f 75 67 68 20 61 6c 6c 20 62 69 6e 64 69 6e 67 73 20 69 6e 20 | ,.we.go.through.all.bindings.in. |
| 11520 | 74 68 65 20 61 73 73 65 74 20 61 6e 64 20 77 68 61 74 65 76 65 72 0d 0a 20 20 20 20 20 20 20 20 | the.asset.and.whatever.......... |
| 11540 | 20 20 20 20 20 20 20 20 2f 2f 20 64 65 76 69 63 65 20 69 73 20 70 72 65 73 65 6e 74 20 74 68 61 | ........//.device.is.present.tha |
| 11560 | 74 20 6d 61 74 63 68 65 73 20 74 68 65 20 62 69 6e 64 69 6e 67 20 61 6e 64 20 74 68 61 74 20 69 | t.matches.the.binding.and.that.i |
| 11580 | 73 6e 27 74 20 75 73 65 64 20 62 79 20 61 6e 79 20 6f 74 68 65 72 20 70 6c 61 79 65 72 2c 20 77 | sn't.used.by.any.other.player,.w |
| 115a0 | 65 27 6c 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 70 61 69 72 20 74 6f | e'll..................//.pair.to |
| 115c0 | 20 74 68 65 20 70 6c 61 79 65 72 2e 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .the.player..................... |
| 115e0 | 69 66 20 28 73 5f 49 6e 69 74 50 61 69 72 57 69 74 68 44 65 76 69 63 65 73 43 6f 75 6e 74 20 3e | if.(s_InitPairWithDevicesCount.> |
| 11600 | 20 30 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 | .0)..................{.......... |
| 11620 | 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 30 3b 20 69 20 3c 20 | ............for.(var.i.=.0;.i.<. |
| 11640 | 73 5f 49 6e 69 74 50 61 69 72 57 69 74 68 44 65 76 69 63 65 73 43 6f 75 6e 74 3b 20 2b 2b 69 29 | s_InitPairWithDevicesCount;.++i) |
| 11660 | 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 6d 5f 49 6e 70 75 | ..........................m_Inpu |
| 11680 | 74 55 73 65 72 20 3d 20 49 6e 70 75 74 55 73 65 72 2e 50 65 72 66 6f 72 6d 50 61 69 72 69 6e 67 | tUser.=.InputUser.PerformPairing |
| 116a0 | 57 69 74 68 44 65 76 69 63 65 28 73 5f 49 6e 69 74 50 61 69 72 57 69 74 68 44 65 76 69 63 65 73 | WithDevice(s_InitPairWithDevices |
| 116c0 | 5b 69 5d 2c 20 6d 5f 49 6e 70 75 74 55 73 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | [i],.m_InputUser);.............. |
| 116e0 | 20 20 20 20 7d 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 | ....}..................else..... |
| 11700 | 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 | .............{.................. |
| 11720 | 20 20 20 20 2f 2f 20 50 61 69 72 20 61 6c 6c 20 64 65 76 69 63 65 73 20 66 6f 72 20 77 68 69 63 | ....//.Pair.all.devices.for.whic |
| 11740 | 68 20 77 65 20 68 61 76 65 20 61 20 62 69 6e 64 69 6e 67 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 | h.we.have.a.binding............. |
| 11760 | 20 20 20 20 20 20 20 20 20 20 75 73 69 6e 67 20 28 76 61 72 20 61 76 61 69 6c 61 62 6c 65 44 65 | ..........using.(var.availableDe |
| 11780 | 76 69 63 65 73 20 3d 20 49 6e 70 75 74 55 73 65 72 2e 47 65 74 55 6e 70 61 69 72 65 64 49 6e 70 | vices.=.InputUser.GetUnpairedInp |
| 117a0 | 75 74 44 65 76 69 63 65 73 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | utDevices()).................... |
| 117c0 | 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 66 6f 72 | ..{..........................for |
| 117e0 | 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 61 76 61 69 6c 61 62 6c 65 44 65 76 69 63 65 | .(var.i.=.0;.i.<.availableDevice |
| 11800 | 73 2e 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | s.Count;.++i)................... |
| 11820 | 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 | .......{........................ |
| 11840 | 20 20 20 20 20 20 76 61 72 20 64 65 76 69 63 65 20 3d 20 61 76 61 69 6c 61 62 6c 65 44 65 76 69 | ......var.device.=.availableDevi |
| 11860 | 63 65 73 5b 69 5d 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 | ces[i];......................... |
| 11880 | 20 20 20 20 20 69 66 20 28 21 48 61 76 65 42 69 6e 64 69 6e 67 46 6f 72 44 65 76 69 63 65 28 64 | .....if.(!HaveBindingForDevice(d |
| 118a0 | 65 76 69 63 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | evice))......................... |
| 118c0 | 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 20 20 20 20 20 | .........continue;.............. |
| 118e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6e 70 75 74 55 73 65 72 20 3d 20 | ..................m_InputUser.=. |
| 11900 | 49 6e 70 75 74 55 73 65 72 2e 50 65 72 66 6f 72 6d 50 61 69 72 69 6e 67 57 69 74 68 44 65 76 69 | InputUser.PerformPairingWithDevi |
| 11920 | 63 65 28 64 65 76 69 63 65 2c 20 6d 5f 49 6e 70 75 74 55 73 65 72 29 3b 0d 0a 20 20 20 20 20 20 | ce(device,.m_InputUser);........ |
| 11940 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ..................}............. |
| 11960 | 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 7d 0d 0a 20 | .........}..................}... |
| 11980 | 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 2f 2f 20 49 | ...........}................//.I |
| 119a0 | 66 20 77 65 20 64 6f 6e 27 74 20 68 61 76 65 20 61 20 76 61 6c 69 64 20 75 73 65 72 20 61 74 20 | f.we.don't.have.a.valid.user.at. |
| 119c0 | 74 68 69 73 20 70 6f 69 6e 74 2c 20 77 65 20 64 6f 6e 27 74 20 68 61 76 65 20 61 6e 79 20 70 61 | this.point,.we.don't.have.any.pa |
| 119e0 | 69 72 65 64 20 64 65 76 69 63 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d | ired.devices...............if.(m |
| 11a00 | 5f 49 6e 70 75 74 55 73 65 72 2e 76 61 6c 69 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | _InputUser.valid)............... |
| 11a20 | 20 20 20 6d 5f 49 6e 70 75 74 55 73 65 72 2e 41 73 73 6f 63 69 61 74 65 41 63 74 69 6f 6e 73 57 | ...m_InputUser.AssociateActionsW |
| 11a40 | 69 74 68 55 73 65 72 28 6d 5f 41 63 74 69 6f 6e 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a | ithUser(m_Actions);..........}.. |
| 11a60 | 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 48 61 76 65 42 69 6e 64 69 | ..........private.bool.HaveBindi |
| 11a80 | 6e 67 46 6f 72 44 65 76 69 63 65 28 49 6e 70 75 74 44 65 76 69 63 65 20 64 65 76 69 63 65 29 0d | ngForDevice(InputDevice.device). |
| 11aa0 | 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 63 | .........{..............if.(m_Ac |
| 11ac0 | 74 69 6f 6e 73 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | tions.==.null).................. |
| 11ae0 | 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 | return.false;................var |
| 11b00 | 20 61 63 74 69 6f 6e 4d 61 70 73 20 3d 20 6d 5f 41 63 74 69 6f 6e 73 2e 61 63 74 69 6f 6e 4d 61 | .actionMaps.=.m_Actions.actionMa |
| 11b20 | 70 73 3b 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 30 3b | ps;..............for.(var.i.=.0; |
| 11b40 | 20 69 20 3c 20 61 63 74 69 6f 6e 4d 61 70 73 2e 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 | .i.<.actionMaps.Count;.++i)..... |
| 11b60 | 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 76 61 72 20 | .........{..................var. |
| 11b80 | 61 63 74 69 6f 6e 4d 61 70 20 3d 20 61 63 74 69 6f 6e 4d 61 70 73 5b 69 5d 3b 0d 0a 20 20 20 20 | actionMap.=.actionMaps[i];...... |
| 11ba0 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 4d 61 70 2e 49 73 55 73 61 62 | ............if.(actionMap.IsUsab |
| 11bc0 | 6c 65 57 69 74 68 44 65 76 69 63 65 28 64 65 76 69 63 65 29 29 0d 0a 20 20 20 20 20 20 20 20 20 | leWithDevice(device))........... |
| 11be0 | 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 20 20 | ...........return.true;......... |
| 11c00 | 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c | .....}................return.fal |
| 11c20 | 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 | se;..........}............privat |
| 11c40 | 65 20 76 6f 69 64 20 55 6e 61 73 73 69 67 6e 55 73 65 72 41 6e 64 44 65 76 69 63 65 73 28 29 0d | e.void.UnassignUserAndDevices(). |
| 11c60 | 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 49 6e | .........{..............if.(m_In |
| 11c80 | 70 75 74 55 73 65 72 2e 76 61 6c 69 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | putUser.valid).................. |
| 11ca0 | 6d 5f 49 6e 70 75 74 55 73 65 72 2e 55 6e 70 61 69 72 44 65 76 69 63 65 73 41 6e 64 52 65 6d 6f | m_InputUser.UnpairDevicesAndRemo |
| 11cc0 | 76 65 55 73 65 72 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 63 74 | veUser();..............if.(m_Act |
| 11ce0 | 69 6f 6e 73 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d | ions.!=.null)..................m |
| 11d00 | 5f 41 63 74 69 6f 6e 73 2e 64 65 76 69 63 65 73 20 3d 20 6e 75 6c 6c 3b 0d 0a 20 20 20 20 20 20 | _Actions.devices.=.null;........ |
| 11d20 | 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 62 6f 6f 6c 20 54 72 79 54 | ..}............private.bool.TryT |
| 11d40 | 6f 41 63 74 69 76 61 74 65 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 28 49 6e 70 75 74 43 6f 6e 74 | oActivateControlScheme(InputCont |
| 11d60 | 72 6f 6c 53 63 68 65 6d 65 20 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 29 0d 0a 20 20 20 20 20 20 | rolScheme.controlScheme)........ |
| 11d80 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 46 49 58 4d 45 3a 20 74 68 69 73 | ..{..............////FIXME:.this |
| 11da0 | 20 77 69 6c 6c 20 66 61 6c 6c 20 61 70 61 72 74 20 69 66 20 61 63 63 6f 75 6e 74 20 6d 61 6e 61 | .will.fall.apart.if.account.mana |
| 11dc0 | 67 65 6d 65 6e 74 20 69 73 20 69 6e 76 6f 6c 76 65 64 20 61 6e 64 20 61 20 75 73 65 72 20 6e 65 | gement.is.involved.and.a.user.ne |
| 11de0 | 65 64 73 20 74 6f 20 6c 6f 67 20 69 6e 20 6f 6e 20 64 65 76 69 63 65 20 66 69 72 73 74 0d 0a 0d | eds.to.log.in.on.device.first... |
| 11e00 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 50 61 69 72 20 61 6e 79 20 64 65 76 69 63 65 73 | .............//.Pair.any.devices |
| 11e20 | 20 77 65 20 6d 61 79 20 68 61 76 65 20 62 65 65 6e 20 67 69 76 65 6e 2e 0d 0a 20 20 20 20 20 20 | .we.may.have.been.given......... |
| 11e40 | 20 20 20 20 20 20 69 66 20 28 73 5f 49 6e 69 74 50 61 69 72 57 69 74 68 44 65 76 69 63 65 73 43 | ......if.(s_InitPairWithDevicesC |
| 11e60 | 6f 75 6e 74 20 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 | ount.>.0)..............{........ |
| 11e80 | 20 20 20 20 20 20 20 20 20 20 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 73 68 6f 75 6c 64 20 41 6e 64 | ..........////REVIEW:.should.And |
| 11ea0 | 50 61 69 72 52 65 6d 61 69 6e 69 6e 67 44 65 76 69 63 65 73 28 29 20 72 65 71 75 69 72 65 20 74 | PairRemainingDevices().require.t |
| 11ec0 | 68 61 74 20 74 68 65 72 65 20 69 73 20 61 74 20 6c 65 61 73 74 20 6f 6e 65 20 65 78 69 73 74 69 | hat.there.is.at.least.one.existi |
| 11ee0 | 6e 67 0d 0a 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 | ng..................////........ |
| 11f00 | 64 65 76 69 63 65 20 70 61 69 72 65 64 20 74 6f 20 74 68 65 20 75 73 65 72 20 74 68 61 74 20 69 | device.paired.to.the.user.that.i |
| 11f20 | 73 20 75 73 61 62 6c 65 20 77 69 74 68 20 74 68 65 20 67 69 76 65 6e 20 63 6f 6e 74 72 6f 6c 20 | s.usable.with.the.given.control. |
| 11f40 | 73 63 68 65 6d 65 3f 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 46 69 | scheme?....................//.Fi |
| 11f60 | 72 73 74 20 6d 61 6b 65 20 73 75 72 65 20 74 68 61 74 20 61 6c 6c 20 6f 66 20 74 68 65 20 64 65 | rst.make.sure.that.all.of.the.de |
| 11f80 | 76 69 63 65 73 20 61 63 74 75 61 6c 6c 79 20 77 6f 72 6b 20 77 69 74 68 20 74 68 65 20 67 69 76 | vices.actually.work.with.the.giv |
| 11fa0 | 65 6e 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | en.control.scheme............... |
| 11fc0 | 20 20 20 20 2f 2f 20 57 65 27 72 65 20 66 69 6e 65 20 68 61 76 69 6e 67 20 74 6f 20 70 61 69 72 | ....//.We're.fine.having.to.pair |
| 11fe0 | 20 61 64 64 69 74 69 6f 6e 61 6c 20 64 65 76 69 63 65 73 20 62 75 74 20 77 65 20 64 6f 6e 27 74 | .additional.devices.but.we.don't |
| 12000 | 20 77 61 6e 74 20 74 68 65 20 73 69 74 75 61 74 69 6f 6e 20 77 68 65 72 65 0d 0a 20 20 20 20 20 | .want.the.situation.where....... |
| 12020 | 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 77 65 20 68 61 76 65 20 74 68 65 20 70 6c 61 79 65 72 | ...........//.we.have.the.player |
| 12040 | 20 67 72 61 62 20 61 6c 6c 20 74 68 65 20 64 65 76 69 63 65 73 20 69 6e 20 73 5f 49 6e 69 74 50 | .grab.all.the.devices.in.s_InitP |
| 12060 | 61 69 72 57 69 74 68 44 65 76 69 63 65 73 20 61 6c 6f 6e 67 20 77 69 74 68 20 61 20 63 6f 6e 74 | airWithDevices.along.with.a.cont |
| 12080 | 72 6f 6c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 73 63 68 65 6d 65 20 74 | rol..................//.scheme.t |
| 120a0 | 68 61 74 20 66 69 74 73 20 6e 6f 6e 65 20 6f 66 20 74 68 65 6d 20 61 6e 64 20 74 68 65 6e 20 41 | hat.fits.none.of.them.and.then.A |
| 120c0 | 6e 64 50 61 69 72 52 65 6d 61 69 6e 69 6e 67 44 65 76 69 63 65 73 28 29 20 73 75 70 70 6c 79 69 | ndPairRemainingDevices().supplyi |
| 120e0 | 6e 67 20 74 68 65 20 64 65 76 69 63 65 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ng.the.devices.................. |
| 12100 | 2f 2f 20 61 63 74 75 61 6c 6c 79 20 6e 65 65 64 65 64 20 62 79 20 74 68 65 20 63 6f 6e 74 72 6f | //.actually.needed.by.the.contro |
| 12120 | 6c 20 73 63 68 65 6d 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 | l.scheme...................for.( |
| 12140 | 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 73 5f 49 6e 69 74 50 61 69 72 57 69 74 68 44 65 76 | var.i.=.0;.i.<.s_InitPairWithDev |
| 12160 | 69 63 65 73 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | icesCount;.++i)................. |
| 12180 | 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 64 65 76 69 | .{......................var.devi |
| 121a0 | 63 65 20 3d 20 73 5f 49 6e 69 74 50 61 69 72 57 69 74 68 44 65 76 69 63 65 73 5b 69 5d 3b 0d 0a | ce.=.s_InitPairWithDevices[i];.. |
| 121c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 63 6f 6e 74 72 6f 6c | ....................if.(!control |
| 121e0 | 53 63 68 65 6d 65 2e 53 75 70 70 6f 72 74 73 44 65 76 69 63 65 28 64 65 76 69 63 65 29 29 0d 0a | Scheme.SupportsDevice(device)).. |
| 12200 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 | ........................return.f |
| 12220 | 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 | alse;..................}........ |
| 12240 | 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 65 27 72 65 20 67 6f 6f 64 2e 20 47 69 76 65 20 | ............//.We're.good..Give. |
| 12260 | 74 68 65 20 64 65 76 69 63 65 73 20 74 6f 20 74 68 65 20 75 73 65 72 2e 0d 0a 20 20 20 20 20 20 | the.devices.to.the.user......... |
| 12280 | 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 73 5f | ..........for.(var.i.=.0;.i.<.s_ |
| 122a0 | 49 6e 69 74 50 61 69 72 57 69 74 68 44 65 76 69 63 65 73 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a | InitPairWithDevicesCount;.++i).. |
| 122c0 | 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 20 | ................{............... |
| 122e0 | 20 20 20 20 20 20 20 76 61 72 20 64 65 76 69 63 65 20 3d 20 73 5f 49 6e 69 74 50 61 69 72 57 69 | .......var.device.=.s_InitPairWi |
| 12300 | 74 68 44 65 76 69 63 65 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | thDevices[i];................... |
| 12320 | 20 20 20 6d 5f 49 6e 70 75 74 55 73 65 72 20 3d 20 49 6e 70 75 74 55 73 65 72 2e 50 65 72 66 6f | ...m_InputUser.=.InputUser.Perfo |
| 12340 | 72 6d 50 61 69 72 69 6e 67 57 69 74 68 44 65 76 69 63 65 28 64 65 76 69 63 65 2c 20 6d 5f 49 6e | rmPairingWithDevice(device,.m_In |
| 12360 | 70 75 74 55 73 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 | putUser);..................}.... |
| 12380 | 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 | ..........}................if.(! |
| 123a0 | 6d 5f 49 6e 70 75 74 55 73 65 72 2e 76 61 6c 69 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | m_InputUser.valid).............. |
| 123c0 | 20 20 20 20 6d 5f 49 6e 70 75 74 55 73 65 72 20 3d 20 49 6e 70 75 74 55 73 65 72 2e 43 72 65 61 | ....m_InputUser.=.InputUser.Crea |
| 123e0 | 74 65 55 73 65 72 57 69 74 68 6f 75 74 50 61 69 72 65 64 44 65 76 69 63 65 73 28 29 3b 0d 0a 0d | teUserWithoutPairedDevices();... |
| 12400 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6e 70 75 74 55 73 65 72 2e 41 63 74 69 76 61 74 | .............m_InputUser.Activat |
| 12420 | 65 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 28 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 29 2e 41 6e | eControlScheme(controlScheme).An |
| 12440 | 64 50 61 69 72 52 65 6d 61 69 6e 69 6e 67 44 65 76 69 63 65 73 28 29 3b 0d 0a 20 20 20 20 20 20 | dPairRemainingDevices();........ |
| 12460 | 20 20 20 20 20 20 69 66 20 28 75 73 65 72 2e 68 61 73 4d 69 73 73 69 6e 67 52 65 71 75 69 72 65 | ......if.(user.hasMissingRequire |
| 12480 | 64 44 65 76 69 63 65 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 | dDevices)..............{........ |
| 124a0 | 20 20 20 20 20 20 20 20 20 20 6d 5f 49 6e 70 75 74 55 73 65 72 2e 41 63 74 69 76 61 74 65 43 6f | ..........m_InputUser.ActivateCo |
| 124c0 | 6e 74 72 6f 6c 53 63 68 65 6d 65 28 6e 75 6c 6c 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ntrolScheme(null);.............. |
| 124e0 | 20 20 20 20 6d 5f 49 6e 70 75 74 55 73 65 72 2e 55 6e 70 61 69 72 44 65 76 69 63 65 73 28 29 3b | ....m_InputUser.UnpairDevices(); |
| 12500 | 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 73 65 3b 0d | ..................return.false;. |
| 12520 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 | .............}................re |
| 12540 | 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 | turn.true;..........}........... |
| 12560 | 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 41 73 73 69 67 6e 50 6c 61 79 65 72 49 6e 64 65 78 28 | .private.void.AssignPlayerIndex( |
| 12580 | 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 69 66 20 28 73 5f | )..........{..............if.(s_ |
| 125a0 | 49 6e 69 74 50 6c 61 79 65 72 49 6e 64 65 78 20 21 3d 20 2d 31 29 0d 0a 20 20 20 20 20 20 20 20 | InitPlayerIndex.!=.-1).......... |
| 125c0 | 20 20 20 20 20 20 20 20 6d 5f 50 6c 61 79 65 72 49 6e 64 65 78 20 3d 20 73 5f 49 6e 69 74 50 6c | ........m_PlayerIndex.=.s_InitPl |
| 125e0 | 61 79 65 72 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 | ayerIndex;..............else.... |
| 12600 | 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 76 61 72 | ..........{..................var |
| 12620 | 20 6d 69 6e 50 6c 61 79 65 72 49 6e 64 65 78 20 3d 20 69 6e 74 2e 4d 61 78 56 61 6c 75 65 3b 0d | .minPlayerIndex.=.int.MaxValue;. |
| 12640 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6d 61 78 50 6c 61 79 65 72 49 6e | .................var.maxPlayerIn |
| 12660 | 64 65 78 20 3d 20 69 6e 74 2e 4d 69 6e 56 61 6c 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 | dex.=.int.MinValue;............. |
| 12680 | 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 73 5f 41 6c 6c | .......for.(var.i.=.0;.i.<.s_All |
| 126a0 | 41 63 74 69 76 65 50 6c 61 79 65 72 73 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 | ActivePlayersCount;.++i)........ |
| 126c0 | 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..........{..................... |
| 126e0 | 20 76 61 72 20 70 6c 61 79 65 72 49 6e 64 65 78 20 3d 20 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c | .var.playerIndex.=.s_AllActivePl |
| 12700 | 61 79 65 72 73 5b 69 5d 2e 70 6c 61 79 65 72 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 | ayers[i].playerIndex;........... |
| 12720 | 20 20 20 20 20 20 20 20 20 20 20 6d 69 6e 50 6c 61 79 65 72 49 6e 64 65 78 20 3d 20 4d 61 74 68 | ...........minPlayerIndex.=.Math |
| 12740 | 2e 4d 69 6e 28 6d 69 6e 50 6c 61 79 65 72 49 6e 64 65 78 2c 20 70 6c 61 79 65 72 49 6e 64 65 78 | .Min(minPlayerIndex,.playerIndex |
| 12760 | 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 61 78 50 6c 61 79 65 | );......................maxPlaye |
| 12780 | 72 49 6e 64 65 78 20 3d 20 4d 61 74 68 2e 4d 61 78 28 6d 61 78 50 6c 61 79 65 72 49 6e 64 65 78 | rIndex.=.Math.Max(maxPlayerIndex |
| 127a0 | 2c 20 70 6c 61 79 65 72 49 6e 64 65 78 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,.playerIndex);................. |
| 127c0 | 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 69 6e 50 6c 61 | .}....................if.(minPla |
| 127e0 | 79 65 72 49 6e 64 65 78 20 21 3d 20 69 6e 74 2e 4d 61 78 56 61 6c 75 65 20 26 26 20 6d 69 6e 50 | yerIndex.!=.int.MaxValue.&&.minP |
| 12800 | 6c 61 79 65 72 49 6e 64 65 78 20 3e 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | layerIndex.>.0)................. |
| 12820 | 20 7b 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 54 68 65 72 65 | .{......................//.There |
| 12840 | 27 73 20 61 6e 20 69 6e 64 65 78 20 62 65 74 77 65 65 6e 20 30 20 61 6e 64 20 74 68 65 20 63 75 | 's.an.index.between.0.and.the.cu |
| 12860 | 72 72 65 6e 74 20 6d 69 6e 69 6d 75 6d 20 61 76 61 69 6c 61 62 6c 65 2e 0d 0a 20 20 20 20 20 20 | rrent.minimum.available......... |
| 12880 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 50 6c 61 79 65 72 49 6e 64 65 78 20 3d 20 6d 69 | ..............m_PlayerIndex.=.mi |
| 128a0 | 6e 50 6c 61 79 65 72 49 6e 64 65 78 20 2d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | nPlayerIndex.-.1;............... |
| 128c0 | 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 6d | ...}..................else.if.(m |
| 128e0 | 61 78 50 6c 61 79 65 72 49 6e 64 65 78 20 21 3d 20 69 6e 74 2e 4d 69 6e 56 61 6c 75 65 29 0d 0a | axPlayerIndex.!=.int.MinValue).. |
| 12900 | 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 20 | ................{............... |
| 12920 | 20 20 20 20 20 20 20 2f 2f 20 54 68 65 72 65 20 6d 61 79 20 62 65 20 61 6e 20 69 6e 64 65 78 20 | .......//.There.may.be.an.index. |
| 12940 | 62 65 74 77 65 65 6e 20 74 68 65 20 6d 69 6e 69 6d 75 6d 20 61 6e 64 20 6d 61 78 69 6d 75 6d 20 | between.the.minimum.and.maximum. |
| 12960 | 61 76 61 69 6c 61 62 6c 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | available....................... |
| 12980 | 2f 2f 20 53 65 61 72 63 68 20 74 68 65 20 72 61 6e 67 65 2e 20 49 66 20 74 68 65 72 65 27 73 20 | //.Search.the.range..If.there's. |
| 129a0 | 6e 6f 74 68 69 6e 67 2c 20 63 72 65 61 74 65 20 61 20 6e 65 77 20 6d 61 78 69 6d 75 6d 2e 0d 0a | nothing,.create.a.new.maximum... |
| 129c0 | 20 20 20 20 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 69 20 3d | ....................for.(var.i.= |
| 129e0 | 20 6d 69 6e 50 6c 61 79 65 72 49 6e 64 65 78 3b 20 69 20 3c 20 6d 61 78 50 6c 61 79 65 72 49 6e | .minPlayerIndex;.i.<.maxPlayerIn |
| 12a00 | 64 65 78 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b | dex;.++i)......................{ |
| 12a20 | 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 47 65 | ..........................if.(Ge |
| 12a40 | 74 50 6c 61 79 65 72 42 79 49 6e 64 65 78 28 69 29 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 | tPlayerByIndex(i).==.null)...... |
| 12a60 | 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 20 20 20 20 | ....................{........... |
| 12a80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 50 6c 61 79 65 72 49 6e 64 65 78 | ...................m_PlayerIndex |
| 12aa0 | 20 3d 20 69 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 | .=.i;........................... |
| 12ac0 | 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 20 20 20 20 | ...return;...................... |
| 12ae0 | 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 7d 0d 0a 0d 0a | ....}......................}.... |
| 12b00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 50 6c 61 79 65 72 49 6e 64 65 | ....................m_PlayerInde |
| 12b20 | 78 20 3d 20 6d 61 78 50 6c 61 79 65 72 49 6e 64 65 78 20 2b 20 31 3b 0d 0a 20 20 20 20 20 20 20 | x.=.maxPlayerIndex.+.1;......... |
| 12b40 | 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 65 6c 73 65 | .........}..................else |
| 12b60 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 50 6c 61 79 65 72 49 6e | ......................m_PlayerIn |
| 12b80 | 64 65 78 20 3d 20 30 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 | dex.=.0;..............}......... |
| 12ba0 | 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 4f 6e 45 6e 61 | .}............private.void.OnEna |
| 12bc0 | 62 6c 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 6d 5f | ble()..........{..............m_ |
| 12be0 | 45 6e 61 62 6c 65 64 20 3d 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 | Enabled.=.true;................A |
| 12c00 | 73 73 69 67 6e 50 6c 61 79 65 72 49 6e 64 65 78 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ssignPlayerIndex();............. |
| 12c20 | 20 49 6e 69 74 69 61 6c 69 7a 65 41 63 74 69 6f 6e 73 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 | .InitializeActions();........... |
| 12c40 | 20 20 20 41 73 73 69 67 6e 55 73 65 72 41 6e 64 44 65 76 69 63 65 73 28 29 3b 0d 0a 20 20 20 20 | ...AssignUserAndDevices();...... |
| 12c60 | 20 20 20 20 20 20 20 20 41 63 74 69 76 61 74 65 49 6e 70 75 74 28 29 3b 0d 0a 0d 0a 20 20 20 20 | ........ActivateInput();........ |
| 12c80 | 20 20 20 20 20 20 20 20 2f 2f 20 53 70 6c 69 74 2d 73 63 72 65 65 6e 20 69 6e 64 65 78 20 64 65 | ........//.Split-screen.index.de |
| 12ca0 | 66 61 75 6c 74 73 20 74 6f 20 70 6c 61 79 65 72 20 69 6e 64 65 78 2e 0d 0a 20 20 20 20 20 20 20 | faults.to.player.index.......... |
| 12cc0 | 20 20 20 20 20 69 66 20 28 73 5f 49 6e 69 74 53 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 20 | .....if.(s_InitSplitScreenIndex. |
| 12ce0 | 3e 3d 20 30 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 53 70 6c 69 74 53 63 | >=.0)..................m_SplitSc |
| 12d00 | 72 65 65 6e 49 6e 64 65 78 20 3d 20 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 3b 0d 0a 20 | reenIndex.=.splitScreenIndex;... |
| 12d20 | 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................. |
| 12d40 | 20 6d 5f 53 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 20 3d 20 70 6c 61 79 65 72 49 6e 64 65 | .m_SplitScreenIndex.=.playerInde |
| 12d60 | 78 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 74 6f 20 67 6c 6f 62 | x;................//.Add.to.glob |
| 12d80 | 61 6c 20 6c 69 73 74 20 61 6e 64 20 73 6f 72 74 20 69 74 20 62 79 20 70 6c 61 79 65 72 20 69 6e | al.list.and.sort.it.by.player.in |
| 12da0 | 64 65 78 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 72 72 61 79 48 65 6c 70 65 72 73 2e 41 | dex...............ArrayHelpers.A |
| 12dc0 | 70 70 65 6e 64 57 69 74 68 43 61 70 61 63 69 74 79 28 72 65 66 20 73 5f 41 6c 6c 41 63 74 69 76 | ppendWithCapacity(ref.s_AllActiv |
| 12de0 | 65 50 6c 61 79 65 72 73 2c 20 72 65 66 20 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 | ePlayers,.ref.s_AllActivePlayers |
| 12e00 | 43 6f 75 6e 74 2c 20 74 68 69 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 | Count,.this);..............for.( |
| 12e20 | 76 61 72 20 69 20 3d 20 31 3b 20 69 20 3c 20 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 | var.i.=.1;.i.<.s_AllActivePlayer |
| 12e40 | 73 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f | sCount;.++i)..................fo |
| 12e60 | 72 20 28 76 61 72 20 6a 20 3d 20 69 3b 20 6a 20 3e 20 30 20 26 26 20 73 5f 41 6c 6c 41 63 74 69 | r.(var.j.=.i;.j.>.0.&&.s_AllActi |
| 12e80 | 76 65 50 6c 61 79 65 72 73 5b 6a 20 2d 20 31 5d 2e 70 6c 61 79 65 72 49 6e 64 65 78 20 3e 20 73 | vePlayers[j.-.1].playerIndex.>.s |
| 12ea0 | 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 5b 6a 5d 2e 70 6c 61 79 65 72 49 6e 64 65 78 | _AllActivePlayers[j].playerIndex |
| 12ec0 | 3b 20 2d 2d 6a 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f 41 6c | ;.--j)......................s_Al |
| 12ee0 | 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 2e 53 77 61 70 45 6c 65 6d 65 6e 74 73 28 6a 2c 20 6a | lActivePlayers.SwapElements(j,.j |
| 12f00 | 20 2d 20 31 29 3b 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 | .-.1);................//.If.it's |
| 12f20 | 20 74 68 65 20 66 69 72 73 74 20 70 6c 61 79 65 72 2c 20 68 6f 6f 6b 20 69 6e 74 6f 20 75 73 65 | .the.first.player,.hook.into.use |
| 12f40 | 72 20 63 68 61 6e 67 65 20 6e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 0d 0a 20 20 20 20 20 20 20 | r.change.notifications.......... |
| 12f60 | 20 20 20 20 20 69 66 20 28 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 43 6f 75 6e 74 | .....if.(s_AllActivePlayersCount |
| 12f80 | 20 3d 3d 20 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 | .==.1)..............{........... |
| 12fa0 | 20 20 20 20 20 20 20 69 66 20 28 73 5f 55 73 65 72 43 68 61 6e 67 65 44 65 6c 65 67 61 74 65 20 | .......if.(s_UserChangeDelegate. |
| 12fc0 | 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 5f | ==.null)......................s_ |
| 12fe0 | 55 73 65 72 43 68 61 6e 67 65 44 65 6c 65 67 61 74 65 20 3d 20 4f 6e 55 73 65 72 43 68 61 6e 67 | UserChangeDelegate.=.OnUserChang |
| 13000 | 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 55 73 65 72 2e 6f 6e | e;..................InputUser.on |
| 13020 | 43 68 61 6e 67 65 20 2b 3d 20 73 5f 55 73 65 72 43 68 61 6e 67 65 44 65 6c 65 67 61 74 65 3b 0d | Change.+=.s_UserChangeDelegate;. |
| 13040 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f | .............}................// |
| 13060 | 20 49 6e 20 73 69 6e 67 6c 65 20 70 6c 61 79 65 72 2c 20 73 65 74 20 75 70 20 66 6f 72 20 61 75 | .In.single.player,.set.up.for.au |
| 13080 | 74 6f 6d 61 74 69 63 20 64 65 76 69 63 65 20 73 77 69 74 63 68 69 6e 67 2e 0d 0a 20 20 20 20 20 | tomatic.device.switching........ |
| 130a0 | 20 20 20 20 20 20 20 69 66 20 28 69 73 53 69 6e 67 6c 65 50 6c 61 79 65 72 29 0d 0a 20 20 20 20 | .......if.(isSinglePlayer)...... |
| 130c0 | 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d | ........{..................if.(m |
| 130e0 | 5f 41 63 74 69 6f 6e 73 20 21 3d 20 6e 75 6c 6c 20 26 26 20 6d 5f 41 63 74 69 6f 6e 73 2e 63 6f | _Actions.!=.null.&&.m_Actions.co |
| 13100 | 6e 74 72 6f 6c 53 63 68 65 6d 65 73 2e 43 6f 75 6e 74 20 3d 3d 20 30 29 0d 0a 20 20 20 20 20 20 | ntrolSchemes.Count.==.0)........ |
| 13120 | 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..........{..................... |
| 13140 | 20 2f 2f 20 4e 6f 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 2e 20 57 65 20 70 69 63 6b 20 | .//.No.control.schemes..We.pick. |
| 13160 | 75 70 20 77 68 61 74 65 76 65 72 20 69 73 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 74 | up.whatever.is.compatible.with.t |
| 13180 | 68 65 20 62 69 6e 64 69 6e 67 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | he.bindings..................... |
| 131a0 | 20 2f 2f 20 77 65 20 68 61 76 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .//.we.have..................... |
| 131c0 | 20 20 53 74 61 72 74 4c 69 73 74 65 6e 69 6e 67 46 6f 72 44 65 76 69 63 65 43 68 61 6e 67 65 73 | ..StartListeningForDeviceChanges |
| 131e0 | 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 | ();..................}.......... |
| 13200 | 20 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 21 6e 65 76 65 72 41 75 74 6f 53 77 69 74 63 | ........else.if.(!neverAutoSwitc |
| 13220 | 68 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 73 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | hControlSchemes)................ |
| 13240 | 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 2f 2f 20 57 65 20 68 | ..{......................//.We.h |
| 13260 | 61 76 65 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 20 73 6f 20 77 65 20 6f 6e 6c 79 20 6c | ave.control.schemes.so.we.only.l |
| 13280 | 69 73 74 65 6e 20 66 6f 72 20 75 6e 70 61 69 72 65 64 20 64 65 76 69 63 65 20 2a 69 6e 70 75 74 | isten.for.unpaired.device.*input |
| 132a0 | 2a 2c 20 69 2e 65 2e 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 | *,.i.e.......................//. |
| 132c0 | 61 63 74 75 61 6c 20 75 73 65 20 6f 66 20 61 6e 20 75 6e 70 61 69 72 65 64 20 64 65 76 69 63 65 | actual.use.of.an.unpaired.device |
| 132e0 | 20 28 61 73 20 6f 70 70 6f 73 65 64 20 74 6f 20 69 74 20 6d 65 72 65 6c 79 20 67 65 74 74 69 6e | .(as.opposed.to.it.merely.gettin |
| 13300 | 67 20 70 6c 75 67 67 65 64 20 69 6e 29 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | g.plugged.in)................... |
| 13320 | 20 20 20 20 53 74 61 72 74 4c 69 73 74 65 6e 69 6e 67 46 6f 72 55 6e 70 61 69 72 65 64 44 65 76 | ....StartListeningForUnpairedDev |
| 13340 | 69 63 65 41 63 74 69 76 69 74 79 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | iceActivity();.................. |
| 13360 | 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | }..............}................ |
| 13380 | 2f 2f 20 54 72 69 67 67 65 72 20 6a 6f 69 6e 20 65 76 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 | //.Trigger.join.event........... |
| 133a0 | 20 20 20 20 50 6c 61 79 65 72 49 6e 70 75 74 4d 61 6e 61 67 65 72 2e 69 6e 73 74 61 6e 63 65 3f | ....PlayerInputManager.instance? |
| 133c0 | 2e 4e 6f 74 69 66 79 50 6c 61 79 65 72 4a 6f 69 6e 65 64 28 74 68 69 73 29 3b 0d 0a 20 20 20 20 | .NotifyPlayerJoined(this);...... |
| 133e0 | 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 53 74 | ....}............private.void.St |
| 13400 | 61 72 74 4c 69 73 74 65 6e 69 6e 67 46 6f 72 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 41 63 74 | artListeningForUnpairedDeviceAct |
| 13420 | 69 76 69 74 79 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 | ivity()..........{.............. |
| 13440 | 69 66 20 28 6d 5f 4f 6e 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 55 73 65 64 48 6f 6f 6b 65 64 | if.(m_OnUnpairedDeviceUsedHooked |
| 13460 | 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 3b 0d 0a 20 20 20 20 | )..................return;...... |
| 13480 | 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 55 73 65 64 | ........if.(m_UnpairedDeviceUsed |
| 134a0 | 44 65 6c 65 67 61 74 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | Delegate.==.null)............... |
| 134c0 | 20 20 20 6d 5f 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 55 73 65 64 44 65 6c 65 67 61 74 65 20 | ...m_UnpairedDeviceUsedDelegate. |
| 134e0 | 3d 20 4f 6e 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 55 73 65 64 3b 0d 0a 20 20 20 20 20 20 20 | =.OnUnpairedDeviceUsed;......... |
| 13500 | 20 20 20 20 20 49 6e 70 75 74 55 73 65 72 2e 6f 6e 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 55 | .....InputUser.onUnpairedDeviceU |
| 13520 | 73 65 64 20 2b 3d 20 6d 5f 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 55 73 65 64 44 65 6c 65 67 | sed.+=.m_UnpairedDeviceUsedDeleg |
| 13540 | 61 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 49 6e 70 75 74 55 73 65 72 2e 6c 69 | ate;..............++InputUser.li |
| 13560 | 73 74 65 6e 46 6f 72 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 41 63 74 69 76 69 74 79 3b 0d 0a | stenForUnpairedDeviceActivity;.. |
| 13580 | 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4f 6e 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 55 73 | ............m_OnUnpairedDeviceUs |
| 135a0 | 65 64 48 6f 6f 6b 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 | edHooked.=.true;..........}..... |
| 135c0 | 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 53 74 6f 70 4c 69 73 74 65 6e 69 6e | .......private.void.StopListenin |
| 135e0 | 67 46 6f 72 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 41 63 74 69 76 69 74 79 28 29 0d 0a 20 20 | gForUnpairedDeviceActivity().... |
| 13600 | 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f 4f 6e 55 6e | ......{..............if.(!m_OnUn |
| 13620 | 70 61 69 72 65 64 44 65 76 69 63 65 55 73 65 64 48 6f 6f 6b 65 64 29 0d 0a 20 20 20 20 20 20 20 | pairedDeviceUsedHooked)......... |
| 13640 | 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 49 6e | .........return;..............In |
| 13660 | 70 75 74 55 73 65 72 2e 6f 6e 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 55 73 65 64 20 2d 3d 20 | putUser.onUnpairedDeviceUsed.-=. |
| 13680 | 6d 5f 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 55 73 65 64 44 65 6c 65 67 61 74 65 3b 0d 0a 20 | m_UnpairedDeviceUsedDelegate;... |
| 136a0 | 20 20 20 20 20 20 20 20 20 20 20 2d 2d 49 6e 70 75 74 55 73 65 72 2e 6c 69 73 74 65 6e 46 6f 72 | ...........--InputUser.listenFor |
| 136c0 | 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 41 63 74 69 76 69 74 79 3b 0d 0a 20 20 20 20 20 20 20 | UnpairedDeviceActivity;......... |
| 136e0 | 20 20 20 20 20 6d 5f 4f 6e 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 55 73 65 64 48 6f 6f 6b 65 | .....m_OnUnpairedDeviceUsedHooke |
| 13700 | 64 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 | d.=.false;..........}........... |
| 13720 | 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 53 74 61 72 74 4c 69 73 74 65 6e 69 6e 67 46 6f 72 44 | .private.void.StartListeningForD |
| 13740 | 65 76 69 63 65 43 68 61 6e 67 65 73 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 | eviceChanges()..........{....... |
| 13760 | 20 20 20 20 20 20 20 69 66 20 28 6d 5f 4f 6e 44 65 76 69 63 65 43 68 61 6e 67 65 48 6f 6f 6b 65 | .......if.(m_OnDeviceChangeHooke |
| 13780 | 64 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 3b 0d 0a 20 20 20 | d)..................return;..... |
| 137a0 | 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 44 65 76 69 63 65 43 68 61 6e 67 65 44 65 6c 65 67 | .........if.(m_DeviceChangeDeleg |
| 137c0 | 61 74 65 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f | ate.==.null)..................m_ |
| 137e0 | 44 65 76 69 63 65 43 68 61 6e 67 65 44 65 6c 65 67 61 74 65 20 3d 20 4f 6e 44 65 76 69 63 65 43 | DeviceChangeDelegate.=.OnDeviceC |
| 13800 | 68 61 6e 67 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e | hange;..............InputSystem. |
| 13820 | 6f 6e 44 65 76 69 63 65 43 68 61 6e 67 65 20 2b 3d 20 6d 5f 44 65 76 69 63 65 43 68 61 6e 67 65 | onDeviceChange.+=.m_DeviceChange |
| 13840 | 44 65 6c 65 67 61 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4f 6e 44 65 76 69 63 | Delegate;..............m_OnDevic |
| 13860 | 65 43 68 61 6e 67 65 48 6f 6f 6b 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d | eChangeHooked.=.true;..........} |
| 13880 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 53 74 6f 70 4c 69 73 | ............private.void.StopLis |
| 138a0 | 74 65 6e 69 6e 67 46 6f 72 44 65 76 69 63 65 43 68 61 6e 67 65 73 28 29 0d 0a 20 20 20 20 20 20 | teningForDeviceChanges()........ |
| 138c0 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f 4f 6e 44 65 76 69 63 65 | ..{..............if.(!m_OnDevice |
| 138e0 | 43 68 61 6e 67 65 48 6f 6f 6b 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 | ChangeHooked)..................r |
| 13900 | 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 53 79 73 74 65 6d 2e | eturn;..............InputSystem. |
| 13920 | 6f 6e 44 65 76 69 63 65 43 68 61 6e 67 65 20 2d 3d 20 6d 5f 44 65 76 69 63 65 43 68 61 6e 67 65 | onDeviceChange.-=.m_DeviceChange |
| 13940 | 44 65 6c 65 67 61 74 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4f 6e 44 65 76 69 63 | Delegate;..............m_OnDevic |
| 13960 | 65 43 68 61 6e 67 65 48 6f 6f 6b 65 64 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 | eChangeHooked.=.false;.......... |
| 13980 | 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 4f 6e 44 69 73 61 | }............private.void.OnDisa |
| 139a0 | 62 6c 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 6d 5f | ble()..........{..............m_ |
| 139c0 | 45 6e 61 62 6c 65 64 20 3d 20 66 61 6c 73 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | Enabled.=.false;................ |
| 139e0 | 2f 2f 20 52 65 6d 6f 76 65 20 66 72 6f 6d 20 67 6c 6f 62 61 6c 20 6c 69 73 74 2e 0d 0a 20 20 20 | //.Remove.from.global.list...... |
| 13a00 | 20 20 20 20 20 20 20 20 20 76 61 72 20 69 6e 64 65 78 20 3d 20 41 72 72 61 79 48 65 6c 70 65 72 | .........var.index.=.ArrayHelper |
| 13a20 | 73 2e 49 6e 64 65 78 4f 66 52 65 66 65 72 65 6e 63 65 28 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c | s.IndexOfReference(s_AllActivePl |
| 13a40 | 61 79 65 72 73 2c 20 74 68 69 73 2c 20 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 43 | ayers,.this,.s_AllActivePlayersC |
| 13a60 | 6f 75 6e 74 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 6e 64 65 78 20 21 3d | ount);..............if.(index.!= |
| 13a80 | 20 2d 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 72 72 61 79 48 65 6c 70 65 | .-1)..................ArrayHelpe |
| 13aa0 | 72 73 2e 45 72 61 73 65 41 74 57 69 74 68 43 61 70 61 63 69 74 79 28 73 5f 41 6c 6c 41 63 74 69 | rs.EraseAtWithCapacity(s_AllActi |
| 13ac0 | 76 65 50 6c 61 79 65 72 73 2c 20 72 65 66 20 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 | vePlayers,.ref.s_AllActivePlayer |
| 13ae0 | 73 43 6f 75 6e 74 2c 20 69 6e 64 65 78 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f | sCount,.index);................/ |
| 13b00 | 2f 20 55 6e 68 6f 6f 6b 20 66 72 6f 6d 20 63 68 61 6e 67 65 20 6e 6f 74 69 66 69 63 61 74 69 6f | /.Unhook.from.change.notificatio |
| 13b20 | 6e 73 20 69 66 20 77 65 27 72 65 20 74 68 65 20 6c 61 73 74 20 70 6c 61 79 65 72 2e 0d 0a 20 20 | ns.if.we're.the.last.player..... |
| 13b40 | 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 | ..........if.(s_AllActivePlayers |
| 13b60 | 43 6f 75 6e 74 20 3d 3d 20 30 20 26 26 20 73 5f 55 73 65 72 43 68 61 6e 67 65 44 65 6c 65 67 61 | Count.==.0.&&.s_UserChangeDelega |
| 13b80 | 74 65 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 | te.!=.null)..................Inp |
| 13ba0 | 75 74 55 73 65 72 2e 6f 6e 43 68 61 6e 67 65 20 2d 3d 20 73 5f 55 73 65 72 43 68 61 6e 67 65 44 | utUser.onChange.-=.s_UserChangeD |
| 13bc0 | 65 6c 65 67 61 74 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 74 6f 70 4c 69 73 74 | elegate;................StopList |
| 13be0 | 65 6e 69 6e 67 46 6f 72 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 41 63 74 69 76 69 74 79 28 29 | eningForUnpairedDeviceActivity() |
| 13c00 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 53 74 6f 70 4c 69 73 74 65 6e 69 6e 67 46 6f 72 44 | ;..............StopListeningForD |
| 13c20 | 65 76 69 63 65 43 68 61 6e 67 65 73 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f | eviceChanges();................/ |
| 13c40 | 2f 20 54 72 69 67 67 65 72 20 6c 65 61 76 65 20 65 76 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 | /.Trigger.leave.event........... |
| 13c60 | 20 20 20 20 50 6c 61 79 65 72 49 6e 70 75 74 4d 61 6e 61 67 65 72 2e 69 6e 73 74 61 6e 63 65 3f | ....PlayerInputManager.instance? |
| 13c80 | 2e 4e 6f 74 69 66 79 50 6c 61 79 65 72 4c 65 66 74 28 74 68 69 73 29 3b 0d 0a 0d 0a 20 20 20 20 | .NotifyPlayerLeft(this);........ |
| 13ca0 | 20 20 20 20 20 20 20 20 44 65 61 63 74 69 76 61 74 65 49 6e 70 75 74 28 29 3b 0d 0a 20 20 20 20 | ........DeactivateInput();...... |
| 13cc0 | 20 20 20 20 20 20 20 20 55 6e 61 73 73 69 67 6e 55 73 65 72 41 6e 64 44 65 76 69 63 65 73 28 29 | ........UnassignUserAndDevices() |
| 13ce0 | 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 55 6e 69 6e 69 74 69 61 6c 69 7a 65 41 63 74 69 6f | ;..............UninitializeActio |
| 13d00 | 6e 73 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 50 6c 61 79 65 72 49 6e 64 | ns();................m_PlayerInd |
| 13d20 | 65 78 20 3d 20 2d 31 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f | ex.=.-1;..........}............/ |
| 13d40 | 2f 20 52 65 53 68 61 72 70 65 72 20 64 69 73 61 62 6c 65 20 6f 6e 63 65 20 55 6e 75 73 65 64 4d | /.ReSharper.disable.once.UnusedM |
| 13d60 | 65 6d 62 65 72 2e 47 6c 6f 62 61 6c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 | ember.Global..........///.<summa |
| 13d80 | 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 44 65 62 75 67 20 68 65 6c 70 65 72 20 6d 65 | ry>..........///.Debug.helper.me |
| 13da0 | 74 68 6f 64 20 74 68 61 74 20 63 61 6e 20 62 65 20 68 6f 6f 6b 65 64 20 75 70 20 74 6f 20 61 63 | thod.that.can.be.hooked.up.to.ac |
| 13dc0 | 74 69 6f 6e 73 20 77 68 65 6e 20 75 73 69 6e 67 20 3c 73 65 65 20 63 72 65 66 3d 22 55 6e 69 74 | tions.when.using.<see.cref="Unit |
| 13de0 | 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 50 6c 61 79 65 72 4e 6f 74 69 66 69 | yEngine.InputSystem.PlayerNotifi |
| 13e00 | 63 61 74 69 6f 6e 73 2e 49 6e 76 6f 6b 65 55 6e 69 74 79 45 76 65 6e 74 73 22 2f 3e 2e 0d 0a 20 | cations.InvokeUnityEvents"/>.... |
| 13e20 | 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 70 | .......///.</summary>..........p |
| 13e40 | 75 62 6c 69 63 20 76 6f 69 64 20 44 65 62 75 67 4c 6f 67 41 63 74 69 6f 6e 28 49 6e 70 75 74 41 | ublic.void.DebugLogAction(InputA |
| 13e60 | 63 74 69 6f 6e 2e 43 61 6c 6c 62 61 63 6b 43 6f 6e 74 65 78 74 20 63 6f 6e 74 65 78 74 29 0d 0a | ction.CallbackContext.context).. |
| 13e80 | 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 | ........{..............Debug.Log |
| 13ea0 | 28 63 6f 6e 74 65 78 74 2e 54 6f 53 74 72 69 6e 67 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d | (context.ToString());..........} |
| 13ec0 | 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 48 61 6e 64 6c 65 44 | ............private.void.HandleD |
| 13ee0 | 65 76 69 63 65 4c 6f 73 74 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 | eviceLost()..........{.......... |
| 13f00 | 20 20 20 20 73 77 69 74 63 68 20 28 6d 5f 4e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 | ....switch.(m_NotificationBehavi |
| 13f20 | 6f 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | or)..............{.............. |
| 13f40 | 20 20 20 20 63 61 73 65 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 53 65 6e | ....case.PlayerNotifications.Sen |
| 13f60 | 64 4d 65 73 73 61 67 65 73 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | dMessages:...................... |
| 13f80 | 53 65 6e 64 4d 65 73 73 61 67 65 28 44 65 76 69 63 65 4c 6f 73 74 4d 65 73 73 61 67 65 2c 20 74 | SendMessage(DeviceLostMessage,.t |
| 13fa0 | 68 69 73 2c 20 53 65 6e 64 4d 65 73 73 61 67 65 4f 70 74 69 6f 6e 73 2e 44 6f 6e 74 52 65 71 75 | his,.SendMessageOptions.DontRequ |
| 13fc0 | 69 72 65 52 65 63 65 69 76 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ireReceiver);................... |
| 13fe0 | 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 | ...break;....................cas |
| 14000 | 65 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 42 72 6f 61 64 63 61 73 74 4d | e.PlayerNotifications.BroadcastM |
| 14020 | 65 73 73 61 67 65 73 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 42 72 | essages:......................Br |
| 14040 | 6f 61 64 63 61 73 74 4d 65 73 73 61 67 65 28 44 65 76 69 63 65 4c 6f 73 74 4d 65 73 73 61 67 65 | oadcastMessage(DeviceLostMessage |
| 14060 | 2c 20 74 68 69 73 2c 20 53 65 6e 64 4d 65 73 73 61 67 65 4f 70 74 69 6f 6e 73 2e 44 6f 6e 74 52 | ,.this,.SendMessageOptions.DontR |
| 14080 | 65 71 75 69 72 65 52 65 63 65 69 76 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | equireReceiver);................ |
| 140a0 | 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ......break;.................... |
| 140c0 | 63 61 73 65 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 49 6e 76 6f 6b 65 55 | case.PlayerNotifications.InvokeU |
| 140e0 | 6e 69 74 79 45 76 65 6e 74 73 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | nityEvents:..................... |
| 14100 | 20 6d 5f 44 65 76 69 63 65 4c 6f 73 74 45 76 65 6e 74 3f 2e 49 6e 76 6f 6b 65 28 74 68 69 73 29 | .m_DeviceLostEvent?.Invoke(this) |
| 14120 | 3b 0d 0a 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 0d | ;......................break;... |
| 14140 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 50 6c 61 79 65 72 4e 6f 74 69 | .................case.PlayerNoti |
| 14160 | 66 69 63 61 74 69 6f 6e 73 2e 49 6e 76 6f 6b 65 43 53 68 61 72 70 45 76 65 6e 74 73 3a 0d 0a 20 | fications.InvokeCSharpEvents:... |
| 14180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 6c 65 67 61 74 65 48 65 6c 70 65 | ...................DelegateHelpe |
| 141a0 | 72 73 2e 49 6e 76 6f 6b 65 43 61 6c 6c 62 61 63 6b 73 53 61 66 65 28 72 65 66 20 6d 5f 44 65 76 | rs.InvokeCallbacksSafe(ref.m_Dev |
| 141c0 | 69 63 65 4c 6f 73 74 43 61 6c 6c 62 61 63 6b 73 2c 20 74 68 69 73 2c 20 22 6f 6e 44 65 76 69 63 | iceLostCallbacks,.this,."onDevic |
| 141e0 | 65 4c 6f 73 74 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 | eLost");......................br |
| 14200 | 65 61 6b 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 | eak;..............}..........}.. |
| 14220 | 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 48 61 6e 64 6c 65 44 65 76 | ..........private.void.HandleDev |
| 14240 | 69 63 65 52 65 67 61 69 6e 65 64 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 | iceRegained()..........{........ |
| 14260 | 20 20 20 20 20 20 73 77 69 74 63 68 20 28 6d 5f 4e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 | ......switch.(m_NotificationBeha |
| 14280 | 76 69 6f 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 | vior)..............{............ |
| 142a0 | 20 20 20 20 20 20 63 61 73 65 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 53 | ......case.PlayerNotifications.S |
| 142c0 | 65 6e 64 4d 65 73 73 61 67 65 73 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | endMessages:.................... |
| 142e0 | 20 20 53 65 6e 64 4d 65 73 73 61 67 65 28 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 4d 65 73 73 | ..SendMessage(DeviceRegainedMess |
| 14300 | 61 67 65 2c 20 74 68 69 73 2c 20 53 65 6e 64 4d 65 73 73 61 67 65 4f 70 74 69 6f 6e 73 2e 44 6f | age,.this,.SendMessageOptions.Do |
| 14320 | 6e 74 52 65 71 75 69 72 65 52 65 63 65 69 76 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ntRequireReceiver);............. |
| 14340 | 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | .........break;................. |
| 14360 | 20 20 20 63 61 73 65 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 42 72 6f 61 | ...case.PlayerNotifications.Broa |
| 14380 | 64 63 61 73 74 4d 65 73 73 61 67 65 73 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | dcastMessages:.................. |
| 143a0 | 20 20 20 20 42 72 6f 61 64 63 61 73 74 4d 65 73 73 61 67 65 28 44 65 76 69 63 65 52 65 67 61 69 | ....BroadcastMessage(DeviceRegai |
| 143c0 | 6e 65 64 4d 65 73 73 61 67 65 2c 20 74 68 69 73 2c 20 53 65 6e 64 4d 65 73 73 61 67 65 4f 70 74 | nedMessage,.this,.SendMessageOpt |
| 143e0 | 69 6f 6e 73 2e 44 6f 6e 74 52 65 71 75 69 72 65 52 65 63 65 69 76 65 72 29 3b 0d 0a 20 20 20 20 | ions.DontRequireReceiver);...... |
| 14400 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 | ................break;.......... |
| 14420 | 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f | ..........case.PlayerNotificatio |
| 14440 | 6e 73 2e 49 6e 76 6f 6b 65 55 6e 69 74 79 45 76 65 6e 74 73 3a 0d 0a 20 20 20 20 20 20 20 20 20 | ns.InvokeUnityEvents:........... |
| 14460 | 20 20 20 20 20 20 20 20 20 20 20 6d 5f 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 45 76 65 6e 74 | ...........m_DeviceRegainedEvent |
| 14480 | 3f 2e 49 6e 76 6f 6b 65 28 74 68 69 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ?.Invoke(this);................. |
| 144a0 | 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 | .....break;....................c |
| 144c0 | 61 73 65 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 49 6e 76 6f 6b 65 43 53 | ase.PlayerNotifications.InvokeCS |
| 144e0 | 68 61 72 70 45 76 65 6e 74 73 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | harpEvents:..................... |
| 14500 | 20 44 65 6c 65 67 61 74 65 48 65 6c 70 65 72 73 2e 49 6e 76 6f 6b 65 43 61 6c 6c 62 61 63 6b 73 | .DelegateHelpers.InvokeCallbacks |
| 14520 | 53 61 66 65 28 72 65 66 20 6d 5f 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 43 61 6c 6c 62 61 63 | Safe(ref.m_DeviceRegainedCallbac |
| 14540 | 6b 73 2c 20 74 68 69 73 2c 20 22 6f 6e 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 22 29 3b 0d 0a | ks,.this,."onDeviceRegained");.. |
| 14560 | 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 20 20 20 20 | ....................break;...... |
| 14580 | 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 | ........}..........}............ |
| 145a0 | 70 72 69 76 61 74 65 20 76 6f 69 64 20 48 61 6e 64 6c 65 43 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 | private.void.HandleControlsChang |
| 145c0 | 65 64 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 77 69 | ed()..........{..............swi |
| 145e0 | 74 63 68 20 28 6d 5f 4e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 29 0d 0a 20 20 | tch.(m_NotificationBehavior).... |
| 14600 | 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 63 61 73 | ..........{..................cas |
| 14620 | 65 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 53 65 6e 64 4d 65 73 73 61 67 | e.PlayerNotifications.SendMessag |
| 14640 | 65 73 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 53 65 6e 64 4d 65 73 | es:......................SendMes |
| 14660 | 73 61 67 65 28 43 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 65 64 4d 65 73 73 61 67 65 2c 20 74 68 69 | sage(ControlsChangedMessage,.thi |
| 14680 | 73 2c 20 53 65 6e 64 4d 65 73 73 61 67 65 4f 70 74 69 6f 6e 73 2e 44 6f 6e 74 52 65 71 75 69 72 | s,.SendMessageOptions.DontRequir |
| 146a0 | 65 52 65 63 65 69 76 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | eReceiver);..................... |
| 146c0 | 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 | .break;....................case. |
| 146e0 | 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 42 72 6f 61 64 63 61 73 74 4d 65 73 | PlayerNotifications.BroadcastMes |
| 14700 | 73 61 67 65 73 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 42 72 6f 61 | sages:......................Broa |
| 14720 | 64 63 61 73 74 4d 65 73 73 61 67 65 28 43 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 65 64 4d 65 73 73 | dcastMessage(ControlsChangedMess |
| 14740 | 61 67 65 2c 20 74 68 69 73 2c 20 53 65 6e 64 4d 65 73 73 61 67 65 4f 70 74 69 6f 6e 73 2e 44 6f | age,.this,.SendMessageOptions.Do |
| 14760 | 6e 74 52 65 71 75 69 72 65 52 65 63 65 69 76 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | ntRequireReceiver);............. |
| 14780 | 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | .........break;................. |
| 147a0 | 20 20 20 63 61 73 65 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 49 6e 76 6f | ...case.PlayerNotifications.Invo |
| 147c0 | 6b 65 55 6e 69 74 79 45 76 65 6e 74 73 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | keUnityEvents:.................. |
| 147e0 | 20 20 20 20 6d 5f 43 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 65 64 45 76 65 6e 74 3f 2e 49 6e 76 6f | ....m_ControlsChangedEvent?.Invo |
| 14800 | 6b 65 28 74 68 69 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 | ke(this);......................b |
| 14820 | 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 50 6c | reak;....................case.Pl |
| 14840 | 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 73 2e 49 6e 76 6f 6b 65 43 53 68 61 72 70 45 76 | ayerNotifications.InvokeCSharpEv |
| 14860 | 65 6e 74 73 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 6c 65 67 | ents:......................Deleg |
| 14880 | 61 74 65 48 65 6c 70 65 72 73 2e 49 6e 76 6f 6b 65 43 61 6c 6c 62 61 63 6b 73 53 61 66 65 28 72 | ateHelpers.InvokeCallbacksSafe(r |
| 148a0 | 65 66 20 6d 5f 43 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 65 64 43 61 6c 6c 62 61 63 6b 73 2c 20 74 | ef.m_ControlsChangedCallbacks,.t |
| 148c0 | 68 69 73 2c 20 22 6f 6e 43 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 65 64 22 29 3b 0d 0a 20 20 20 20 | his,."onControlsChanged");...... |
| 148e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0d 0a 20 20 20 20 20 20 20 20 | ................break;.......... |
| 14900 | 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 70 72 69 76 | ....}..........}............priv |
| 14920 | 61 74 65 20 73 74 61 74 69 63 20 76 6f 69 64 20 4f 6e 55 73 65 72 43 68 61 6e 67 65 28 49 6e 70 | ate.static.void.OnUserChange(Inp |
| 14940 | 75 74 55 73 65 72 20 75 73 65 72 2c 20 49 6e 70 75 74 55 73 65 72 43 68 61 6e 67 65 20 63 68 61 | utUser.user,.InputUserChange.cha |
| 14960 | 6e 67 65 2c 20 49 6e 70 75 74 44 65 76 69 63 65 20 64 65 76 69 63 65 29 0d 0a 20 20 20 20 20 20 | nge,.InputDevice.device)........ |
| 14980 | 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 77 69 74 63 68 20 28 63 68 61 6e 67 65 29 | ..{..............switch.(change) |
| 149a0 | 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 | ..............{................. |
| 149c0 | 20 63 61 73 65 20 49 6e 70 75 74 55 73 65 72 43 68 61 6e 67 65 2e 44 65 76 69 63 65 4c 6f 73 74 | .case.InputUserChange.DeviceLost |
| 149e0 | 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 49 6e 70 75 74 55 73 65 | :..................case.InputUse |
| 14a00 | 72 43 68 61 6e 67 65 2e 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 3a 0d 0a 20 20 20 20 20 20 20 | rChange.DeviceRegained:......... |
| 14a20 | 20 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 30 3b 20 69 20 3c | .............for.(var.i.=.0;.i.< |
| 14a40 | 20 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a | .s_AllActivePlayersCount;.++i).. |
| 14a60 | 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 20 20 20 20 | ....................{........... |
| 14a80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 70 6c 61 79 65 72 20 3d 20 73 5f 41 6c | ...............var.player.=.s_Al |
| 14aa0 | 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 5b 69 5d 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | lActivePlayers[i];.............. |
| 14ac0 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 6c 61 79 65 72 2e 6d 5f 49 6e 70 75 74 55 73 | ............if.(player.m_InputUs |
| 14ae0 | 65 72 20 3d 3d 20 75 73 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | er.==.user)..................... |
| 14b00 | 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 | .....{.......................... |
| 14b20 | 20 20 20 20 69 66 20 28 63 68 61 6e 67 65 20 3d 3d 20 49 6e 70 75 74 55 73 65 72 43 68 61 6e 67 | ....if.(change.==.InputUserChang |
| 14b40 | 65 2e 44 65 76 69 63 65 4c 6f 73 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | e.DeviceLost)................... |
| 14b60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 6c 61 79 65 72 2e 48 61 6e 64 6c 65 44 65 76 69 | ...............player.HandleDevi |
| 14b80 | 63 65 4c 6f 73 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ceLost();....................... |
| 14ba0 | 20 20 20 20 20 20 20 65 6c 73 65 20 69 66 20 28 63 68 61 6e 67 65 20 3d 3d 20 49 6e 70 75 74 55 | .......else.if.(change.==.InputU |
| 14bc0 | 73 65 72 43 68 61 6e 67 65 2e 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 29 0d 0a 20 20 20 20 20 | serChange.DeviceRegained)....... |
| 14be0 | 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 70 6c 61 79 65 | ...........................playe |
| 14c00 | 72 2e 48 61 6e 64 6c 65 44 65 76 69 63 65 52 65 67 61 69 6e 65 64 28 29 3b 0d 0a 20 20 20 20 20 | r.HandleDeviceRegained();....... |
| 14c20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 | ...................}............ |
| 14c40 | 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 | ..........}..................... |
| 14c60 | 20 62 72 65 61 6b 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 | .break;....................case. |
| 14c80 | 49 6e 70 75 74 55 73 65 72 43 68 61 6e 67 65 2e 43 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 65 64 3a | InputUserChange.ControlsChanged: |
| 14ca0 | 0d 0a 20 20 20 20 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 69 | ......................for.(var.i |
| 14cc0 | 20 3d 20 30 3b 20 69 20 3c 20 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 43 6f 75 6e | .=.0;.i.<.s_AllActivePlayersCoun |
| 14ce0 | 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a | t;.++i)......................{.. |
| 14d00 | 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 20 70 6c 61 79 | ........................var.play |
| 14d20 | 65 72 20 3d 20 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 5b 69 5d 3b 0d 0a 20 20 20 | er.=.s_AllActivePlayers[i];..... |
| 14d40 | 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 70 6c 61 79 65 72 2e | .....................if.(player. |
| 14d60 | 6d 5f 49 6e 70 75 74 55 73 65 72 20 3d 3d 20 75 73 65 72 29 0d 0a 20 20 20 20 20 20 20 20 20 20 | m_InputUser.==.user)............ |
| 14d80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 6c 61 79 65 72 2e 48 61 6e 64 6c 65 43 | ..................player.HandleC |
| 14da0 | 6f 6e 74 72 6f 6c 73 43 68 61 6e 67 65 64 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ontrolsChanged();............... |
| 14dc0 | 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 62 72 | .......}......................br |
| 14de0 | 65 61 6b 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 | eak;..............}..........}.. |
| 14e00 | 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 6f 69 64 20 4f 6e 55 6e 70 61 69 72 65 | ..........private.void.OnUnpaire |
| 14e20 | 64 44 65 76 69 63 65 55 73 65 64 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 20 63 6f 6e 74 72 6f 6c | dDeviceUsed(InputControl.control |
| 14e40 | 2c 20 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 20 20 20 20 | ,.InputEventPtr.eventPtr)....... |
| 14e60 | 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 65 20 6f 6e 6c 79 20 73 75 70 | ...{..............//.We.only.sup |
| 14e80 | 70 6f 72 74 20 61 75 74 6f 6d 61 74 69 63 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 73 77 | port.automatic.control.scheme.sw |
| 14ea0 | 69 74 63 68 69 6e 67 20 69 6e 20 73 69 6e 67 6c 65 20 70 6c 61 79 65 72 20 6d 6f 64 65 2e 0d 0a | itching.in.single.player.mode... |
| 14ec0 | 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4f 6e 45 6e 61 62 6c 65 28 29 20 73 68 6f 75 6c 64 | ............//.OnEnable().should |
| 14ee0 | 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 75 6e 68 6f 6f 6b 20 75 73 2e 0d 0a 20 20 20 20 20 | .automatically.unhook.us........ |
| 14f00 | 20 20 20 20 20 20 20 69 66 20 28 21 69 73 53 69 6e 67 6c 65 50 6c 61 79 65 72 20 7c 7c 20 6e 65 | .......if.(!isSinglePlayer.||.ne |
| 14f20 | 76 65 72 41 75 74 6f 53 77 69 74 63 68 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 73 29 0d 0a 20 20 | verAutoSwitchControlSchemes).... |
| 14f40 | 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;........... |
| 14f60 | 20 20 20 20 20 76 61 72 20 70 6c 61 79 65 72 20 3d 20 61 6c 6c 5b 30 5d 3b 0d 0a 20 20 20 20 20 | .....var.player.=.all[0];....... |
| 14f80 | 20 20 20 20 20 20 20 69 66 20 28 70 6c 61 79 65 72 2e 6d 5f 41 63 74 69 6f 6e 73 20 3d 3d 20 6e | .......if.(player.m_Actions.==.n |
| 14fa0 | 75 6c 6c 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 3b 0d 0a 0d | ull)..................return;... |
| 14fc0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 75 73 69 6e 67 20 28 49 6e 70 75 74 41 63 74 69 6f 6e 52 | .............using.(InputActionR |
| 14fe0 | 65 62 69 6e 64 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 2e 44 65 66 65 72 42 69 6e 64 69 6e 67 52 | ebindingExtensions.DeferBindingR |
| 15000 | 65 73 6f 6c 75 74 69 6f 6e 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 75 73 69 6e 67 20 | esolution())..............using. |
| 15020 | 28 76 61 72 20 61 76 61 69 6c 61 62 6c 65 44 65 76 69 63 65 73 20 3d 20 49 6e 70 75 74 55 73 65 | (var.availableDevices.=.InputUse |
| 15040 | 72 2e 47 65 74 55 6e 70 61 69 72 65 64 49 6e 70 75 74 44 65 76 69 63 65 73 28 29 29 0d 0a 20 20 | r.GetUnpairedInputDevices()).... |
| 15060 | 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 2f 2f 20 | ..........{..................//. |
| 15080 | 50 75 74 20 6f 75 72 20 64 65 76 69 63 65 20 66 69 72 73 74 20 69 6e 20 74 68 65 20 6c 69 73 74 | Put.our.device.first.in.the.list |
| 150a0 | 20 74 6f 20 6d 61 6b 65 20 73 75 72 65 20 69 74 27 73 20 74 68 65 20 66 69 72 73 74 20 6f 6e 65 | .to.make.sure.it's.the.first.one |
| 150c0 | 20 70 69 63 6b 65 64 20 66 6f 72 20 61 20 6d 61 74 63 68 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 | .picked.for.a.match............. |
| 150e0 | 20 20 20 20 20 20 76 61 72 20 64 65 76 69 63 65 20 3d 20 63 6f 6e 74 72 6f 6c 2e 64 65 76 69 63 | ......var.device.=.control.devic |
| 15100 | 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 76 61 69 6c 61 62 6c | e;..................if.(availabl |
| 15120 | 65 44 65 76 69 63 65 73 2e 43 6f 75 6e 74 20 3e 20 31 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | eDevices.Count.>.1)............. |
| 15140 | 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 | .....{......................var. |
| 15160 | 69 6e 64 65 78 4f 66 44 65 76 69 63 65 20 3d 20 61 76 61 69 6c 61 62 6c 65 44 65 76 69 63 65 73 | indexOfDevice.=.availableDevices |
| 15180 | 2e 49 6e 64 65 78 4f 66 28 64 65 76 69 63 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | .IndexOf(device);............... |
| 151a0 | 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 69 6e 64 65 78 4f 66 44 65 76 69 63 | .......Debug.Assert(indexOfDevic |
| 151c0 | 65 20 21 3d 20 2d 31 2c 20 22 44 69 64 20 6e 6f 74 20 66 69 6e 64 20 75 6e 70 61 69 72 65 64 20 | e.!=.-1,."Did.not.find.unpaired. |
| 151e0 | 64 65 76 69 63 65 20 69 6e 20 6c 69 73 74 20 6f 66 20 75 6e 70 61 69 72 65 64 20 64 65 76 69 63 | device.in.list.of.unpaired.devic |
| 15200 | 65 73 22 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 76 61 69 6c | es");......................avail |
| 15220 | 61 62 6c 65 44 65 76 69 63 65 73 2e 53 77 61 70 45 6c 65 6d 65 6e 74 73 28 30 2c 20 69 6e 64 65 | ableDevices.SwapElements(0,.inde |
| 15240 | 78 4f 66 44 65 76 69 63 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a | xOfDevice);..................}.. |
| 15260 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 64 20 61 6c 6c 20 64 65 76 | ..................//.Add.all.dev |
| 15280 | 69 63 65 73 20 63 75 72 72 65 6e 74 6c 79 20 61 6c 72 65 61 64 79 20 70 61 69 72 65 64 20 74 6f | ices.currently.already.paired.to |
| 152a0 | 20 75 73 2e 20 54 68 69 73 20 61 76 6f 69 64 73 20 75 73 20 70 72 65 76 65 6e 74 69 6e 67 0d 0a | .us..This.avoids.us.preventing.. |
| 152c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d | ................//.control.schem |
| 152e0 | 65 73 20 73 77 69 74 63 68 65 73 20 62 65 63 61 75 73 65 20 6f 66 20 64 65 76 69 63 65 73 20 77 | es.switches.because.of.devices.w |
| 15300 | 65 27 72 65 20 6c 6f 6f 6b 69 6e 67 20 66 6f 72 20 61 6c 72 65 61 64 79 20 62 65 69 6e 67 0d 0a | e're.looking.for.already.being.. |
| 15320 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 70 61 69 72 65 64 20 74 6f 20 75 73 2e | ................//.paired.to.us. |
| 15340 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 75 72 72 65 6e 74 44 65 76 | ..................var.currentDev |
| 15360 | 69 63 65 73 20 3d 20 70 6c 61 79 65 72 2e 64 65 76 69 63 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 | ices.=.player.devices;.......... |
| 15380 | 20 20 20 20 20 20 20 20 66 6f 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 63 75 72 72 | ........for.(var.i.=.0;.i.<.curr |
| 153a0 | 65 6e 74 44 65 76 69 63 65 73 2e 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 20 20 20 20 20 | entDevices.Count;.++i).......... |
| 153c0 | 20 20 20 20 20 20 20 20 20 20 20 20 61 76 61 69 6c 61 62 6c 65 44 65 76 69 63 65 73 2e 41 64 64 | ............availableDevices.Add |
| 153e0 | 28 63 75 72 72 65 6e 74 44 65 76 69 63 65 73 5b 69 5d 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 | (currentDevices[i]);............ |
| 15400 | 20 20 20 20 20 20 20 20 2f 2f 20 46 69 6e 64 20 74 68 65 20 62 65 73 74 20 63 6f 6e 74 72 6f 6c | ........//.Find.the.best.control |
| 15420 | 20 73 63 68 65 6d 65 20 74 6f 20 75 73 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .scheme.to.use.................. |
| 15440 | 20 69 66 20 28 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 2e 46 69 6e 64 43 6f 6e 74 | .if.(InputControlScheme.FindCont |
| 15460 | 72 6f 6c 53 63 68 65 6d 65 46 6f 72 44 65 76 69 63 65 73 28 61 76 61 69 6c 61 62 6c 65 44 65 76 | rolSchemeForDevices(availableDev |
| 15480 | 69 63 65 73 2c 20 70 6c 61 79 65 72 2e 6d 5f 41 63 74 69 6f 6e 73 2e 63 6f 6e 74 72 6f 6c 53 63 | ices,.player.m_Actions.controlSc |
| 154a0 | 68 65 6d 65 73 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 75 74 20 | hemes,......................out. |
| 154c0 | 76 61 72 20 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 2c 20 6f 75 74 20 76 61 72 20 6d 61 74 63 68 | var.controlScheme,.out.var.match |
| 154e0 | 52 65 73 75 6c 74 2c 20 6d 75 73 74 49 6e 63 6c 75 64 65 44 65 76 69 63 65 3a 20 64 65 76 69 63 | Result,.mustIncludeDevice:.devic |
| 15500 | 65 29 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 | e))..................{.......... |
| 15520 | 20 20 20 20 20 20 20 20 20 20 20 20 74 72 79 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ............try................. |
| 15540 | 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 | .....{.......................... |
| 15560 | 2f 2f 20 46 69 72 73 74 20 72 65 6d 6f 76 65 20 74 68 65 20 63 75 72 72 65 6e 74 6c 79 20 70 61 | //.First.remove.the.currently.pa |
| 15580 | 69 72 65 64 20 64 65 76 69 63 65 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ired.devices.................... |
| 155a0 | 20 20 20 20 20 20 20 76 61 72 20 75 73 65 72 56 61 6c 69 64 20 3d 20 70 6c 61 79 65 72 2e 75 73 | .......var.userValid.=.player.us |
| 155c0 | 65 72 2e 76 61 6c 69 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | er.valid;....................... |
| 155e0 | 20 20 20 69 66 20 28 75 73 65 72 56 61 6c 69 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...if.(userValid)............... |
| 15600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 6c 61 79 65 72 2e 75 73 65 72 2e 55 6e 70 61 69 | ...............player.user.Unpai |
| 15620 | 72 44 65 76 69 63 65 73 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | rDevices();..................... |
| 15640 | 20 20 20 20 20 20 20 2f 2f 20 54 68 65 6e 20 70 61 69 72 20 64 65 76 69 63 65 73 20 74 68 61 74 | .......//.Then.pair.devices.that |
| 15660 | 20 77 65 27 76 65 20 70 69 63 6b 65 64 20 61 63 63 6f 72 64 69 6e 67 20 74 6f 20 74 68 65 20 63 | .we've.picked.according.to.the.c |
| 15680 | 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ontrol.scheme................... |
| 156a0 | 20 20 20 20 20 20 20 20 76 61 72 20 6e 65 77 44 65 76 69 63 65 73 20 3d 20 6d 61 74 63 68 52 65 | ........var.newDevices.=.matchRe |
| 156c0 | 73 75 6c 74 2e 64 65 76 69 63 65 73 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | sult.devices;................... |
| 156e0 | 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 6e 65 77 44 65 76 69 63 65 73 2e 43 | .......Debug.Assert(newDevices.C |
| 15700 | 6f 75 6e 74 20 3e 20 30 2c 20 22 45 78 70 65 63 74 69 6e 67 20 74 6f 20 73 65 65 20 61 74 20 6c | ount.>.0,."Expecting.to.see.at.l |
| 15720 | 65 61 73 74 20 6f 6e 65 20 64 65 76 69 63 65 20 68 65 72 65 22 29 3b 0d 0a 20 20 20 20 20 20 20 | east.one.device.here");......... |
| 15740 | 20 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 69 20 3d 20 30 3b | .................for.(var.i.=.0; |
| 15760 | 20 69 20 3c 20 6e 65 77 44 65 76 69 63 65 73 2e 43 6f 75 6e 74 3b 20 2b 2b 69 29 0d 0a 20 20 20 | .i.<.newDevices.Count;.++i)..... |
| 15780 | 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 20 20 20 | .....................{.......... |
| 157a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 6c 61 79 65 72 2e 6d 5f 49 6e 70 | ....................player.m_Inp |
| 157c0 | 75 74 55 73 65 72 20 3d 20 49 6e 70 75 74 55 73 65 72 2e 50 65 72 66 6f 72 6d 50 61 69 72 69 6e | utUser.=.InputUser.PerformPairin |
| 157e0 | 67 57 69 74 68 44 65 76 69 63 65 28 6e 65 77 44 65 76 69 63 65 73 5b 69 5d 2c 20 75 73 65 72 3a | gWithDevice(newDevices[i],.user: |
| 15800 | 20 70 6c 61 79 65 72 2e 6d 5f 49 6e 70 75 74 55 73 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 | .player.m_InputUser);........... |
| 15820 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 75 73 65 72 56 61 6c 69 | ...................if.(!userVali |
| 15840 | 64 20 26 26 20 70 6c 61 79 65 72 2e 61 63 74 69 6f 6e 73 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 | d.&&.player.actions.!=.null).... |
| 15860 | 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 70 6c | ..............................pl |
| 15880 | 61 79 65 72 2e 6d 5f 49 6e 70 75 74 55 73 65 72 2e 41 73 73 6f 63 69 61 74 65 41 63 74 69 6f 6e | ayer.m_InputUser.AssociateAction |
| 158a0 | 73 57 69 74 68 55 73 65 72 28 70 6c 61 79 65 72 2e 61 63 74 69 6f 6e 73 29 3b 0d 0a 20 20 20 20 | sWithUser(player.actions);...... |
| 158c0 | 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 20 20 20 20 20 20 20 | ....................}........... |
| 158e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 6e 64 20 66 69 6e 61 6c 6c 79 20 | .................//.And.finally. |
| 15900 | 73 77 69 74 63 68 20 74 6f 20 74 68 65 20 6e 65 77 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 | switch.to.the.new.control.scheme |
| 15920 | 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 70 6c 61 79 65 | ...........................playe |
| 15940 | 72 2e 75 73 65 72 2e 41 63 74 69 76 61 74 65 43 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 28 63 6f 6e | r.user.ActivateControlScheme(con |
| 15960 | 74 72 6f 6c 53 63 68 65 6d 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | trolScheme);.................... |
| 15980 | 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 66 69 6e 61 6c 6c 79 | ..}......................finally |
| 159a0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 | ......................{......... |
| 159c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 61 74 63 68 52 65 73 75 6c 74 2e 44 69 73 | .................matchResult.Dis |
| 159e0 | 70 6f 73 65 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a | pose();......................}.. |
| 15a00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d | ................}..............} |
| 15a20 | 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 76 | ..........}............private.v |
| 15a40 | 6f 69 64 20 4f 6e 44 65 76 69 63 65 43 68 61 6e 67 65 28 49 6e 70 75 74 44 65 76 69 63 65 20 64 | oid.OnDeviceChange(InputDevice.d |
| 15a60 | 65 76 69 63 65 2c 20 49 6e 70 75 74 44 65 76 69 63 65 43 68 61 6e 67 65 20 63 68 61 6e 67 65 29 | evice,.InputDeviceChange.change) |
| 15a80 | 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 49 66 20 61 | ..........{..............//.If.a |
| 15aa0 | 20 64 65 76 69 63 65 20 77 61 73 20 61 64 64 65 64 20 61 6e 64 20 77 65 20 68 61 76 65 20 6e 6f | .device.was.added.and.we.have.no |
| 15ac0 | 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 20 69 6e 20 74 68 65 20 61 63 74 69 6f 6e 73 20 | .control.schemes.in.the.actions. |
| 15ae0 | 61 6e 64 20 77 65 27 72 65 20 69 6e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 73 69 6e | and.we're.in..............//.sin |
| 15b00 | 67 6c 65 2d 70 6c 61 79 65 72 20 6d 6f 64 65 2c 20 70 61 69 72 20 74 68 65 20 64 65 76 69 63 65 | gle-player.mode,.pair.the.device |
| 15b20 | 20 74 6f 20 74 68 65 20 70 6c 61 79 65 72 20 69 66 20 69 74 20 77 6f 72 6b 73 20 77 69 74 68 20 | .to.the.player.if.it.works.with. |
| 15b40 | 74 68 65 20 62 69 6e 64 69 6e 67 73 20 77 65 20 68 61 76 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 | the.bindings.we.have............ |
| 15b60 | 20 20 20 69 66 20 28 63 68 61 6e 67 65 20 3d 3d 20 49 6e 70 75 74 44 65 76 69 63 65 43 68 61 6e | ...if.(change.==.InputDeviceChan |
| 15b80 | 67 65 2e 41 64 64 65 64 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 53 | ge.Added.&&..................isS |
| 15ba0 | 69 6e 67 6c 65 50 6c 61 79 65 72 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | inglePlayer.&&.................. |
| 15bc0 | 6d 5f 41 63 74 69 6f 6e 73 20 21 3d 20 6e 75 6c 6c 20 26 26 20 6d 5f 41 63 74 69 6f 6e 73 2e 63 | m_Actions.!=.null.&&.m_Actions.c |
| 15be0 | 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 73 2e 43 6f 75 6e 74 20 3d 3d 20 30 20 26 26 0d 0a 20 20 20 | ontrolSchemes.Count.==.0.&&..... |
| 15c00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 48 61 76 65 42 69 6e 64 69 6e 67 46 6f 72 44 65 76 69 63 | .............HaveBindingForDevic |
| 15c20 | 65 28 64 65 76 69 63 65 29 20 26 26 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f | e(device).&&..................m_ |
| 15c40 | 49 6e 70 75 74 55 73 65 72 2e 76 61 6c 69 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d | InputUser.valid)..............{. |
| 15c60 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 55 73 65 72 2e 50 65 72 66 6f | .................InputUser.Perfo |
| 15c80 | 72 6d 50 61 69 72 69 6e 67 57 69 74 68 44 65 76 69 63 65 28 64 65 76 69 63 65 2c 20 75 73 65 72 | rmPairingWithDevice(device,.user |
| 15ca0 | 3a 20 6d 5f 49 6e 70 75 74 55 73 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a | :.m_InputUser);..............}.. |
| 15cc0 | 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 61 62 | ........}............[Serializab |
| 15ce0 | 6c 65 5d 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 63 6c 61 73 73 20 41 63 74 69 6f 6e | le]..........public.class.Action |
| 15d00 | 45 76 65 6e 74 20 3a 20 55 6e 69 74 79 45 76 65 6e 74 3c 49 6e 70 75 74 41 63 74 69 6f 6e 2e 43 | Event.:.UnityEvent<InputAction.C |
| 15d20 | 61 6c 6c 62 61 63 6b 43 6f 6e 74 65 78 74 3e 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 | allbackContext>..........{...... |
| 15d40 | 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 73 74 72 69 6e 67 20 61 63 74 69 6f 6e 49 64 20 3d | ........public.string.actionId.= |
| 15d60 | 3e 20 6d 5f 41 63 74 69 6f 6e 49 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 | >.m_ActionId;..............publi |
| 15d80 | 63 20 73 74 72 69 6e 67 20 61 63 74 69 6f 6e 4e 61 6d 65 20 3d 3e 20 6d 5f 41 63 74 69 6f 6e 4e | c.string.actionName.=>.m_ActionN |
| 15da0 | 61 6d 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 | ame;................[SerializeFi |
| 15dc0 | 65 6c 64 5d 20 70 72 69 76 61 74 65 20 73 74 72 69 6e 67 20 6d 5f 41 63 74 69 6f 6e 49 64 3b 0d | eld].private.string.m_ActionId;. |
| 15de0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 46 69 65 6c 64 5d 20 70 72 | .............[SerializeField].pr |
| 15e00 | 69 76 61 74 65 20 73 74 72 69 6e 67 20 6d 5f 41 63 74 69 6f 6e 4e 61 6d 65 3b 0d 0a 0d 0a 20 20 | ivate.string.m_ActionName;...... |
| 15e20 | 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 45 76 65 6e 74 28 29 0d 0a | ..........public.ActionEvent().. |
| 15e40 | 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 7d 0d 0a 0d 0a | ............{..............}.... |
| 15e60 | 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 45 76 65 6e 74 28 49 | ............public.ActionEvent(I |
| 15e80 | 6e 70 75 74 41 63 74 69 6f 6e 20 61 63 74 69 6f 6e 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | nputAction.action).............. |
| 15ea0 | 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 20 3d 3d | {..................if.(action.== |
| 15ec0 | 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f | .null)......................thro |
| 15ee0 | 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 4e 75 6c 6c 45 78 63 65 70 74 69 6f 6e 28 6e 61 6d 65 | w.new.ArgumentNullException(name |
| 15f00 | 6f 66 28 61 63 74 69 6f 6e 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 | of(action));..................if |
| 15f20 | 20 28 61 63 74 69 6f 6e 2e 69 73 53 69 6e 67 6c 65 74 6f 6e 41 63 74 69 6f 6e 29 0d 0a 20 20 20 | .(action.isSingletonAction)..... |
| 15f40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d | .................throw.new.Argum |
| 15f60 | 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 24 22 41 63 74 69 6f 6e 20 6d 75 73 74 20 62 65 20 70 61 | entException($"Action.must.be.pa |
| 15f80 | 72 74 20 6f 66 20 61 6e 20 61 73 73 65 74 20 28 67 69 76 65 6e 20 61 63 74 69 6f 6e 20 27 7b 61 | rt.of.an.asset.(given.action.'{a |
| 15fa0 | 63 74 69 6f 6e 7d 27 20 69 73 20 61 20 73 69 6e 67 6c 65 74 6f 6e 29 22 29 3b 0d 0a 20 20 20 20 | ction}'.is.a.singleton)");...... |
| 15fc0 | 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 2e 61 63 74 69 6f 6e 4d 61 70 | ............if.(action.actionMap |
| 15fe0 | 2e 61 73 73 65 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .asset.==.null)................. |
| 16000 | 20 20 20 20 20 74 68 72 6f 77 20 6e 65 77 20 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e | .....throw.new.ArgumentException |
| 16020 | 28 24 22 41 63 74 69 6f 6e 20 6d 75 73 74 20 62 65 20 70 61 72 74 20 6f 66 20 61 6e 20 61 73 73 | ($"Action.must.be.part.of.an.ass |
| 16040 | 65 74 20 28 67 69 76 65 6e 20 61 63 74 69 6f 6e 20 27 7b 61 63 74 69 6f 6e 7d 27 20 69 73 20 6e | et.(given.action.'{action}'.is.n |
| 16060 | 6f 74 29 22 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 63 74 69 | ot)");....................m_Acti |
| 16080 | 6f 6e 49 64 20 3d 20 61 63 74 69 6f 6e 2e 69 64 2e 54 6f 53 74 72 69 6e 67 28 29 3b 0d 0a 20 20 | onId.=.action.id.ToString();.... |
| 160a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 63 74 69 6f 6e 4e 61 6d 65 20 3d 20 24 22 7b | ..............m_ActionName.=.$"{ |
| 160c0 | 61 63 74 69 6f 6e 2e 61 63 74 69 6f 6e 4d 61 70 2e 6e 61 6d 65 7d 2f 7b 61 63 74 69 6f 6e 2e 6e | action.actionMap.name}/{action.n |
| 160e0 | 61 6d 65 7d 22 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 | ame}";..............}........... |
| 16100 | 20 20 20 20 20 70 75 62 6c 69 63 20 41 63 74 69 6f 6e 45 76 65 6e 74 28 47 75 69 64 20 61 63 74 | .....public.ActionEvent(Guid.act |
| 16120 | 69 6f 6e 47 55 49 44 2c 20 73 74 72 69 6e 67 20 6e 61 6d 65 20 3d 20 6e 75 6c 6c 29 0d 0a 20 20 | ionGUID,.string.name.=.null).... |
| 16140 | 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 6d 5f 41 | ..........{..................m_A |
| 16160 | 63 74 69 6f 6e 49 64 20 3d 20 61 63 74 69 6f 6e 47 55 49 44 2e 54 6f 53 74 72 69 6e 67 28 29 3b | ctionId.=.actionGUID.ToString(); |
| 16180 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 41 63 74 69 6f 6e 4e 61 6d 65 20 3d | ..................m_ActionName.= |
| 161a0 | 20 6e 61 6d 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 7d | .name;..............}..........} |
| 161c0 | 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>....... |
| 161e0 | 20 20 20 2f 2f 2f 20 45 76 65 6e 74 20 74 68 61 74 20 69 73 20 74 72 69 67 67 65 72 65 64 20 77 | ...///.Event.that.is.triggered.w |
| 16200 | 68 65 6e 20 61 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 44 65 76 69 63 65 22 2f 3e | hen.an.<see.cref="InputDevice"/> |
| 16220 | 20 70 61 69 72 65 64 20 74 6f 20 61 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c 61 79 65 72 49 6e | .paired.to.a.<see.cref="PlayerIn |
| 16240 | 70 75 74 22 2f 3e 20 69 73 20 64 69 73 63 6f 6e 6e 65 63 74 65 64 2e 0d 0a 20 20 20 20 20 20 20 | put"/>.is.disconnected.......... |
| 16260 | 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 73 65 | .///.</summary>..........///.<se |
| 16280 | 65 61 6c 73 6f 20 63 72 65 66 3d 22 64 65 76 69 63 65 4c 6f 73 74 45 76 65 6e 74 22 2f 3e 0d 0a | ealso.cref="deviceLostEvent"/>.. |
| 162a0 | 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 61 62 6c 65 5d 0d 0a 20 20 20 20 20 20 20 20 | ........[Serializable].......... |
| 162c0 | 70 75 62 6c 69 63 20 63 6c 61 73 73 20 44 65 76 69 63 65 4c 6f 73 74 45 76 65 6e 74 20 3a 20 55 | public.class.DeviceLostEvent.:.U |
| 162e0 | 6e 69 74 79 45 76 65 6e 74 3c 50 6c 61 79 65 72 49 6e 70 75 74 3e 0d 0a 20 20 20 20 20 20 20 20 | nityEvent<PlayerInput>.......... |
| 16300 | 7b 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 73 75 6d | {..........}............///.<sum |
| 16320 | 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 45 76 65 6e 74 20 74 68 61 74 20 69 73 | mary>..........///.Event.that.is |
| 16340 | 20 74 72 69 67 67 65 72 65 64 20 77 68 65 6e 20 61 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c 61 | .triggered.when.a.<see.cref="Pla |
| 16360 | 79 65 72 49 6e 70 75 74 22 2f 3e 20 72 65 67 61 69 6e 73 20 61 6e 20 3c 73 65 65 20 63 72 65 66 | yerInput"/>.regains.an.<see.cref |
| 16380 | 3d 22 49 6e 70 75 74 44 65 76 69 63 65 22 2f 3e 20 70 72 65 76 69 6f 75 73 6c 79 20 6c 6f 73 74 | ="InputDevice"/>.previously.lost |
| 163a0 | 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 20 20 20 20 | ...........///.</summary>....... |
| 163c0 | 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 64 65 76 69 63 65 52 65 67 61 | ...///.<seealso.cref="deviceRega |
| 163e0 | 69 6e 65 64 45 76 65 6e 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 61 | inedEvent"/>..........[Serializa |
| 16400 | 62 6c 65 5d 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 63 6c 61 73 73 20 44 65 76 69 63 | ble]..........public.class.Devic |
| 16420 | 65 52 65 67 61 69 6e 65 64 45 76 65 6e 74 20 3a 20 55 6e 69 74 79 45 76 65 6e 74 3c 50 6c 61 79 | eRegainedEvent.:.UnityEvent<Play |
| 16440 | 65 72 49 6e 70 75 74 3e 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a | erInput>..........{..........}.. |
| 16460 | 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>......... |
| 16480 | 20 2f 2f 2f 20 45 76 65 6e 74 20 74 68 61 74 20 69 73 20 74 72 69 67 67 65 72 65 64 20 77 68 65 | .///.Event.that.is.triggered.whe |
| 164a0 | 6e 20 74 68 65 20 73 65 74 20 6f 66 20 63 6f 6e 74 72 6f 6c 73 20 75 73 65 64 20 62 79 20 61 20 | n.the.set.of.controls.used.by.a. |
| 164c0 | 3c 73 65 65 20 63 72 65 66 3d 22 50 6c 61 79 65 72 49 6e 70 75 74 22 2f 3e 20 63 68 61 6e 67 65 | <see.cref="PlayerInput"/>.change |
| 164e0 | 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 20 20 20 | s...........///.</summary>...... |
| 16500 | 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 63 6f 6e 74 72 6f 6c 73 43 | ....///.<seealso.cref="controlsC |
| 16520 | 68 61 6e 67 65 64 45 76 65 6e 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 | hangedEvent"/>..........[Seriali |
| 16540 | 7a 61 62 6c 65 5d 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 63 6c 61 73 73 20 43 6f 6e | zable]..........public.class.Con |
| 16560 | 74 72 6f 6c 73 43 68 61 6e 67 65 64 45 76 65 6e 74 20 3a 20 55 6e 69 74 79 45 76 65 6e 74 3c 50 | trolsChangedEvent.:.UnityEvent<P |
| 16580 | 6c 61 79 65 72 49 6e 70 75 74 3e 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 | layerInput>..........{.......... |
| 165a0 | 7d 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 00 00 00 00 00 00 00 01 00 00 00 80 b9 2a 00 00 00 00 00 | }......}..}...............*..... |
| 165c0 | 9c ff ff ff 0b 00 00 00 50 6c 61 79 65 72 49 6e 70 75 74 00 17 00 00 00 55 6e 69 74 79 45 6e 67 | ........PlayerInput.....UnityEng |
| 165e0 | 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 00 | ine.InputSystem. |