summaryrefslogtreecommitdiff
path: root/Library/Artifacts/be/bea2d6f7f0e87a9e7cb88c709643d877
blob: 6f61a9914ec1f1ff3f9e4a1a8fb290ed29e966fb (plain)
ofshex dumpascii
0000 00 00 0f 97 00 00 8c d4 00 00 00 15 00 00 10 00 00 00 00 00 32 30 31 39 2e 33 2e 36 66 31 00 fe ....................2019.3.6f1..
0020 ff ff ff 01 02 00 00 00 0b 04 00 00 00 ff ff 66 9a 86 21 eb 14 35 98 39 dd 34 1d 51 0e c1 f3 42 ...............f..!..5.9.4.Q...B
0040 00 00 00 ed 00 00 00 02 00 00 00 00 00 00 00 37 00 00 80 ff ff ff ff 00 00 00 00 00 80 00 00 00 ...............7................
0060 00 00 00 00 00 00 00 01 00 01 00 a6 03 00 80 b2 01 00 80 04 00 00 00 01 00 00 00 01 00 00 00 00 ................................
0080 00 00 00 00 00 00 00 01 00 01 00 0d 00 00 00 45 04 00 80 0c 00 00 00 02 00 00 00 01 00 00 00 00 ...............E................
00a0 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 03 00 00 00 01 00 80 00 00 ...............#................
00c0 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 04 00 00 00 01 00 80 00 00 ...............,................
00e0 00 00 00 00 00 00 00 01 00 01 00 35 00 00 00 61 04 00 80 0c 00 00 00 05 00 00 00 01 00 00 00 00 ...........5...a................
0100 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 06 00 00 00 01 00 80 00 00 ...............#................
0120 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 07 00 00 00 01 00 80 00 00 ...............,................
0140 00 00 00 00 00 00 00 01 00 01 00 86 02 00 80 72 04 00 80 0c 00 00 00 08 00 00 00 01 00 00 00 00 ...............r................
0160 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 09 00 00 00 01 00 80 00 00 ...............#................
0180 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 0a 00 00 00 01 00 80 00 00 ...............,................
01a0 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ab 01 00 80 ff ff ff ff 0b 00 00 00 01 80 08 00 00 ...........H....................
01c0 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 0c 00 00 00 01 40 08 00 00 ...........1...1............@...
01e0 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 0d 00 00 00 01 00 08 00 00 ................................
0200 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 0e 00 00 00 01 00 08 00 00 ...........Q...j................
0220 00 00 00 00 00 00 00 01 00 01 00 f1 00 00 80 4a 00 00 00 ff ff ff ff 0f 00 00 00 00 c0 00 00 00 ...............J................
0240 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 10 00 00 00 00 80 00 00 00 ...........1...1................
0260 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 11 00 00 00 00 00 00 00 00 ................................
0280 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a 00 00 80 ff ff ff ff 12 00 00 00 00 80 00 00 00 ...............j................
02a0 00 00 00 00 00 00 00 01 00 04 00 5c 00 00 00 9b 00 00 80 ff ff ff ff 13 00 00 00 00 80 00 00 00 ...........\....................
02c0 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 72 00 00 00 ff ff ff ff 14 00 00 00 00 80 00 00 00 ...........H...r................
02e0 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 15 00 00 00 01 40 00 00 00 ...........1...1............@...
0300 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 16 00 00 00 01 00 00 00 00 ................................
0320 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 17 00 00 00 01 00 00 00 00 ...........Q...j................
0340 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 77 00 00 00 ff ff ff ff 18 00 00 00 00 80 00 00 00 ...........H...w................
0360 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 19 00 00 00 01 40 00 00 00 ...........1...1............@...
0380 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 1a 00 00 00 01 00 00 00 00 ................................
03a0 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 1b 00 00 00 01 00 00 00 00 ...........Q...j................
03c0 00 00 00 00 00 00 00 01 00 05 00 48 03 00 80 80 00 00 00 ff ff ff ff 1c 00 00 00 00 80 00 00 00 ...........H....................
03e0 00 00 00 00 00 00 00 01 00 06 01 31 00 00 80 31 00 00 80 ff ff ff ff 1d 00 00 00 01 40 00 00 00 ...........1...1............@...
0400 00 00 00 00 00 00 00 01 00 07 00 de 00 00 80 1b 03 00 80 04 00 00 00 1e 00 00 00 01 00 00 00 00 ................................
0420 00 00 00 00 00 00 00 01 00 07 00 51 00 00 80 6a 00 00 80 01 00 00 00 1f 00 00 00 01 00 00 00 00 ...........Q...j................
0440 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a 03 00 80 0c 00 00 00 20 00 00 00 00 00 00 00 00 ...........y....................
0460 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 23 00 00 00 04 00 00 00 21 00 00 00 01 00 80 00 00 ...............#.......!........
0480 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 2c 00 00 00 08 00 00 00 22 00 00 00 01 00 80 00 00 ...............,......."........
04a0 00 00 00 00 00 00 00 01 00 01 00 11 03 00 80 85 00 00 00 ff ff ff ff 23 00 00 00 01 40 08 00 00 .......................#....@...
04c0 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 24 00 00 00 01 00 08 00 00 ...........1...1.......$........
04e0 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 25 00 00 00 01 00 08 00 00 .......................%........
0500 00 00 00 00 00 00 00 01 00 03 00 2e 03 00 80 6a 00 00 80 08 00 00 00 26 00 00 00 01 00 08 00 00 ...............j.......&........
0520 00 00 00 00 00 00 00 01 00 01 00 d5 03 00 80 93 00 00 00 ff ff ff ff 27 00 00 00 00 80 00 00 00 .......................'........
0540 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 28 00 00 00 00 c0 00 00 00 ...........1...1.......(........
0560 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 29 00 00 00 00 00 00 00 00 .......................)........
0580 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a 00 00 80 ff ff ff ff 2a 00 00 00 00 80 00 00 00 ...............j.......*........
05a0 00 00 00 00 00 00 00 01 00 04 00 48 03 00 80 9b 00 00 80 ff ff ff ff 2b 00 00 00 00 80 00 00 00 ...........H...........+........
05c0 00 00 00 00 00 00 00 01 00 05 01 31 00 00 80 31 00 00 80 ff ff ff ff 2c 00 00 00 01 40 00 00 00 ...........1...1.......,....@...
05e0 00 00 00 00 00 00 00 01 00 06 00 de 00 00 80 1b 03 00 80 04 00 00 00 2d 00 00 00 01 00 00 00 00 .......................-........
0600 00 00 00 00 00 00 00 01 00 06 00 51 00 00 80 6a 00 00 80 01 00 00 00 2e 00 00 00 01 00 00 00 00 ...........Q...j................
0620 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a 03 00 80 0c 00 00 00 2f 00 00 00 00 00 00 00 00 ...........y.........../........
0640 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 23 00 00 00 04 00 00 00 30 00 00 00 01 00 80 00 00 ...............#.......0........
0660 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 2c 00 00 00 08 00 00 00 31 00 00 00 01 00 80 00 00 ...............,.......1........
0680 00 00 00 00 00 00 00 01 00 01 00 20 03 00 80 a7 00 00 00 02 00 00 00 32 00 00 00 00 40 00 00 00 .......................2....@...
06a0 00 00 00 00 00 00 00 01 00 01 00 be 02 00 80 b6 00 00 00 0c 00 00 00 33 00 00 00 00 40 00 00 00 .......................3....@...
06c0 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 23 00 00 00 04 00 00 00 34 00 00 00 01 00 80 00 00 ...............#.......4........
06e0 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 2c 00 00 00 08 00 00 00 35 00 00 00 01 00 80 00 00 ...............,.......5........
0700 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 bb 00 00 00 ff ff ff ff 36 00 00 00 01 80 00 00 00 ...........H...........6........
0720 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 37 00 00 00 01 40 00 00 00 ...........1...1.......7....@...
0740 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 38 00 00 00 01 00 00 00 00 .......................8........
0760 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 39 00 00 00 01 00 00 00 00 ...........Q...j.......9........
0780 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 c6 00 00 00 ff ff ff ff 3a 00 00 00 01 80 00 00 00 ...........H...........:........
07a0 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 3b 00 00 00 01 40 00 00 00 ...........1...1.......;....@...
07c0 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 3c 00 00 00 01 00 00 00 00 .......................<........
07e0 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 3d 00 00 00 01 00 00 00 00 ...........Q...j.......=........
0800 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 d8 00 00 00 ff ff ff ff 3e 00 00 00 01 80 00 00 00 ...........H...........>........
0820 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 00 00 80 ff ff ff ff 3f 00 00 00 01 40 00 00 00 ...........1...1.......?....@...
0840 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b 03 00 80 04 00 00 00 40 00 00 00 01 00 00 00 00 .......................@........
0860 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a 00 00 80 01 00 00 00 41 00 00 00 01 00 00 00 00 ...........Q...j.......A........
0880 00 00 00 00 00 00 00 4d 6f 6e 6f 49 6d 70 6f 72 74 65 72 00 50 50 74 72 3c 45 64 69 74 6f 72 45 .......MonoImporter.PPtr<EditorE
08a0 78 74 65 6e 73 69 6f 6e 3e 00 6d 5f 46 69 6c 65 49 44 00 6d 5f 50 61 74 68 49 44 00 50 50 74 72 xtension>.m_FileID.m_PathID.PPtr
08c0 3c 50 72 65 66 61 62 49 6e 73 74 61 6e 63 65 3e 00 6d 5f 45 78 74 65 72 6e 61 6c 4f 62 6a 65 63 <PrefabInstance>.m_ExternalObjec
08e0 74 73 00 53 6f 75 72 63 65 41 73 73 65 74 49 64 65 6e 74 69 66 69 65 72 00 74 79 70 65 00 61 73 ts.SourceAssetIdentifier.type.as
0900 73 65 6d 62 6c 79 00 6e 61 6d 65 00 6d 5f 55 73 65 64 46 69 6c 65 49 44 73 00 6d 5f 44 65 66 61 sembly.name.m_UsedFileIDs.m_Defa
0920 75 6c 74 52 65 66 65 72 65 6e 63 65 73 00 65 78 65 63 75 74 69 6f 6e 4f 72 64 65 72 00 69 63 6f ultReferences.executionOrder.ico
0940 6e 00 6d 5f 55 73 65 72 44 61 74 61 00 6d 5f 41 73 73 65 74 42 75 6e 64 6c 65 4e 61 6d 65 00 6d n.m_UserData.m_AssetBundleName.m
0960 5f 41 73 73 65 74 42 75 6e 64 6c 65 56 61 72 69 61 6e 74 00 00 00 00 00 73 00 00 00 00 ff ff a3 _AssetBundleVariant.....s.......
0980 47 f1 d7 dc 8f 5a 35 36 a0 3a 21 40 69 c1 4a 2a 00 00 00 81 00 00 00 05 00 00 00 15 01 00 80 37 G....Z56.:!@i.J*...............7
09a0 00 00 80 ff ff ff ff 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 01 00 01 00 a6 03 00 80 b2 ................................
09c0 01 00 80 04 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 00 00 00 00 45 ...............................E
09e0 04 00 80 0c 00 00 00 02 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 ................................
0a00 00 00 00 04 00 00 00 03 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f ................................
0a20 00 00 00 08 00 00 00 04 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 28 00 00 00 61 ...........................(...a
0a40 04 00 80 0c 00 00 00 05 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 ................................
0a60 00 00 00 04 00 00 00 06 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f ................................
0a80 00 00 00 08 00 00 00 07 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 86 02 00 80 72 ...............................r
0aa0 04 00 80 0c 00 00 00 08 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 ................................
0ac0 00 00 00 04 00 00 00 09 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f ................................
0ae0 00 00 00 08 00 00 00 0a 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ab ...........................H....
0b00 01 00 80 ff ff ff ff 0b 00 00 00 01 80 08 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 ...........................1...1
0b20 00 00 80 ff ff ff ff 0c 00 00 00 01 40 08 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b ............@...................
0b40 03 00 80 04 00 00 00 0d 00 00 00 01 00 08 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a ...........................Q...j
0b60 00 00 80 01 00 00 00 0e 00 00 00 01 00 08 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 ea ...........................H....
0b80 01 00 80 ff ff ff ff 0f 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 ...........................1...1
0ba0 00 00 80 ff ff ff ff 10 00 00 00 01 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b ............@...................
0bc0 03 00 80 04 00 00 00 11 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a ...........................Q...j
0be0 00 00 80 01 00 00 00 12 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 f1 00 00 80 3d ...............................=
0c00 00 00 00 ff ff ff ff 13 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 ...........................1...1
0c20 00 00 80 ff ff ff ff 14 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b ................................
0c40 03 00 80 04 00 00 00 15 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 1f 02 00 80 6a ...............................j
0c60 00 00 80 ff ff ff ff 16 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 04 00 48 03 00 80 9b ...........................H....
0c80 00 00 80 ff ff ff ff 17 00 00 00 01 80 00 00 00 00 00 00 00 00 00 00 01 00 05 01 31 00 00 80 31 ...........................1...1
0ca0 00 00 80 ff ff ff ff 18 00 00 00 01 40 00 00 00 00 00 00 00 00 00 00 01 00 06 00 de 00 00 80 1b ............@...................
0cc0 03 00 80 04 00 00 00 19 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 06 00 51 00 00 80 6a ...........................Q...j
0ce0 00 00 80 01 00 00 00 1a 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 04 00 79 02 00 80 0a ...........................y....
0d00 03 00 80 0c 00 00 00 1b 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 05 00 de 00 00 80 16 ................................
0d20 00 00 00 04 00 00 00 1c 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 05 00 2e 03 00 80 1f ................................
0d40 00 00 00 08 00 00 00 1d 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 79 02 00 80 51 ...........................y...Q
0d60 00 00 00 0c 00 00 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 de 00 00 80 16 ................................
0d80 00 00 00 04 00 00 00 1f 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 02 00 2e 03 00 80 1f ................................
0da0 00 00 00 08 00 00 00 20 00 00 00 01 00 80 00 00 00 00 00 00 00 00 00 01 00 01 00 de 00 00 80 58 ...............................X
0dc0 00 00 00 04 00 00 00 21 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 69 .......!...................H...i
0de0 00 00 00 ff ff ff ff 22 00 00 00 10 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 ......."...................1...1
0e00 00 00 80 ff ff ff ff 23 00 00 00 11 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b .......#....@...................
0e20 03 00 80 04 00 00 00 24 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a .......$...................Q...j
0e40 00 00 80 01 00 00 00 25 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 01 00 48 03 00 80 75 .......%...................H...u
0e60 00 00 00 ff ff ff ff 26 00 00 00 10 80 00 00 00 00 00 00 00 00 00 00 01 00 02 01 31 00 00 80 31 .......&...................1...1
0e80 00 00 80 ff ff ff ff 27 00 00 00 11 40 00 00 00 00 00 00 00 00 00 00 01 00 03 00 de 00 00 80 1b .......'....@...................
0ea0 03 00 80 04 00 00 00 28 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 01 00 03 00 51 00 00 80 6a .......(...................Q...j
0ec0 00 00 80 01 00 00 00 29 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 50 50 74 72 3c 45 64 69 74 .......)...............PPtr<Edit
0ee0 6f 72 45 78 74 65 6e 73 69 6f 6e 3e 00 6d 5f 46 69 6c 65 49 44 00 6d 5f 50 61 74 68 49 44 00 50 orExtension>.m_FileID.m_PathID.P
0f00 50 74 72 3c 50 72 65 66 61 62 49 6e 73 74 61 6e 63 65 3e 00 6d 5f 44 65 66 61 75 6c 74 52 65 66 Ptr<PrefabInstance>.m_DefaultRef
0f20 65 72 65 6e 63 65 73 00 6d 5f 49 63 6f 6e 00 6d 5f 45 78 65 63 75 74 69 6f 6e 4f 72 64 65 72 00 erences.m_Icon.m_ExecutionOrder.
0f40 6d 5f 43 6c 61 73 73 4e 61 6d 65 00 6d 5f 4e 61 6d 65 73 70 61 63 65 00 00 00 00 00 02 00 00 00 m_ClassName.m_Namespace.........
0f60 03 00 00 00 00 00 00 00 00 00 00 00 5c 00 00 00 00 00 00 00 e0 79 af 00 00 00 00 00 60 00 00 00 ............\........y......`...
0f80 74 7c 00 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 t|................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 00 00 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 12 00 00 00 50 6c 61 79 65 72 49 6e 70 75 74 4d 61 6e 61 67 65 72 00 00 ............PlayerInputManager..
10a0 e8 7b 00 00 75 73 69 6e 67 20 53 79 73 74 65 6d 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e .{..using.System;..using.UnityEn
10c0 67 69 6e 65 2e 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 gine.Events;..using.UnityEngine.
10e0 49 6e 70 75 74 53 79 73 74 65 6d 2e 43 6f 6e 74 72 6f 6c 73 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 InputSystem.Controls;..using.Uni
1100 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 2e 4c 6f 77 4c 65 76 65 6c 3b 0d 0a tyEngine.InputSystem.LowLevel;..
1120 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 73 using.UnityEngine.InputSystem.Us
1140 65 72 73 3b 0d 0a 75 73 69 6e 67 20 55 6e 69 74 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 ers;..using.UnityEngine.InputSys
1160 74 65 6d 2e 55 74 69 6c 69 74 69 65 73 3b 0d 0a 0d 0a 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 73 68 tem.Utilities;....////REVIEW:.sh
1180 6f 75 6c 64 20 77 65 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 70 6f 6f 6c 2f 72 65 74 61 69 ould.we.automatically.pool/retai
11a0 6e 20 75 70 20 74 6f 20 6d 61 78 50 6c 61 79 65 72 43 6f 75 6e 74 20 70 6c 61 79 65 72 20 69 6e n.up.to.maxPlayerCount.player.in
11c0 73 74 61 6e 63 65 73 3f 0d 0a 0d 0a 2f 2f 2f 2f 52 45 56 49 45 57 3a 20 74 68 65 20 6a 6f 69 6e stances?....////REVIEW:.the.join
11e0 2f 6c 65 61 76 65 20 6d 65 73 73 61 67 65 73 20 73 68 6f 75 6c 64 20 70 72 6f 62 61 62 6c 79 20 /leave.messages.should.probably.
1200 67 69 76 65 20 61 20 2a 47 61 6d 65 4f 62 6a 65 63 74 2a 20 72 61 74 68 65 72 20 74 68 61 6e 20 give.a.*GameObject*.rather.than.
1220 74 68 65 20 50 6c 61 79 65 72 49 6e 70 75 74 20 63 6f 6d 70 6f 6e 65 6e 74 20 28 77 68 69 63 68 the.PlayerInput.component.(which
1240 20 63 61 6e 20 62 65 20 67 6f 74 74 65 6e 20 74 6f 20 76 69 61 20 61 20 73 69 6d 70 6c 65 20 47 .can.be.gotten.to.via.a.simple.G
1260 65 74 43 6f 6d 70 6f 6e 65 6e 74 28 49 6e 43 68 69 6c 64 72 65 6e 29 20 63 61 6c 6c 29 0d 0a 0d etComponent(InChildren).call)...
1280 0a 2f 2f 2f 2f 54 4f 44 4f 3a 20 61 64 64 20 73 75 70 70 6f 72 74 20 66 6f 72 20 72 65 61 63 74 .////TODO:.add.support.for.react
12a0 69 6e 67 20 74 6f 20 70 6c 61 79 65 72 73 20 6d 69 73 73 69 6e 67 20 64 65 76 69 63 65 73 0d 0a ing.to.players.missing.devices..
12c0 0d 0a 6e 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 ..namespace.UnityEngine.InputSys
12e0 74 65 6d 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 tem..{......///.<summary>....../
1300 2f 2f 20 4d 61 6e 61 67 65 73 20 6a 6f 69 6e 69 6e 67 20 61 6e 64 20 6c 65 61 76 69 6e 67 20 6f //.Manages.joining.and.leaving.o
1320 66 20 70 6c 61 79 65 72 73 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a f.players.......///.</summary>..
1340 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 ....///.<remarks>......///.This.
1360 69 73 20 61 20 73 69 6e 67 6c 65 74 6f 6e 20 63 6f 6d 70 6f 6e 65 6e 74 2e 20 4f 6e 6c 79 20 6f is.a.singleton.component..Only.o
1380 6e 65 20 69 6e 73 74 61 6e 63 65 20 69 73 20 6d 65 61 6e 74 20 74 6f 20 62 65 20 61 63 74 69 76 ne.instance.is.meant.to.be.activ
13a0 65 20 69 6e 20 61 20 67 61 6d 65 0d 0a 20 20 20 20 2f 2f 2f 20 61 74 20 61 6e 79 20 6f 6e 65 20 e.in.a.game......///.at.any.one.
13c0 74 69 6d 65 2e 20 54 6f 20 72 65 74 72 69 65 76 65 20 74 68 65 20 63 75 72 72 65 6e 74 20 69 6e time..To.retrieve.the.current.in
13e0 73 74 61 6e 63 65 2c 20 75 73 65 20 3c 73 65 65 20 63 72 65 66 3d 22 69 6e 73 74 61 6e 63 65 22 stance,.use.<see.cref="instance"
1400 2f 3e 2e 0d 0a 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 2f 2f 2f 20 4e 6f 74 65 20 74 68 61 74 20 />.......///......///.Note.that.
1420 61 20 50 6c 61 79 65 72 49 6e 70 75 74 4d 61 6e 61 67 65 72 20 69 73 20 6e 6f 74 20 73 74 72 69 a.PlayerInputManager.is.not.stri
1440 63 74 6c 79 20 72 65 71 75 69 72 65 64 20 74 6f 20 68 61 76 65 20 6d 75 6c 74 69 70 6c 65 20 3c ctly.required.to.have.multiple.<
1460 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 6f 6d 70 6f 6e 65 see.cref="PlayerInput"/>.compone
1480 6e 74 73 2e 0d 0a 20 20 20 20 2f 2f 2f 20 57 68 61 74 20 50 6c 61 79 65 72 49 6e 70 75 74 4d 61 nts.......///.What.PlayerInputMa
14a0 6e 61 67 65 72 20 70 72 6f 76 69 64 65 73 20 69 73 20 74 68 65 20 69 6d 70 6c 65 6d 65 6e 74 61 nager.provides.is.the.implementa
14c0 74 69 6f 6e 20 6f 66 20 73 70 65 63 69 66 69 63 20 70 6c 61 79 65 72 20 6a 6f 69 6e 20 6d 65 63 tion.of.specific.player.join.mec
14e0 68 61 6e 69 73 6d 73 0d 0a 20 20 20 20 2f 2f 2f 20 28 3c 73 65 65 20 63 72 65 66 3d 22 6a 6f 69 hanisms......///.(<see.cref="joi
1500 6e 42 65 68 61 76 69 6f 72 22 2f 3e 29 20 61 73 20 77 65 6c 6c 20 61 73 20 61 75 74 6f 6d 61 74 nBehavior"/>).as.well.as.automat
1520 69 63 20 61 73 73 69 67 6e 6d 65 6e 74 20 6f 66 20 73 70 6c 69 74 2d 73 63 72 65 65 6e 20 61 72 ic.assignment.of.split-screen.ar
1540 65 61 73 20 28 3c 73 65 65 20 63 72 65 66 3d 22 73 70 6c 69 74 53 63 72 65 65 6e 22 2f 3e 29 2e eas.(<see.cref="splitScreen"/>).
1560 0d 0a 20 20 20 20 2f 2f 2f 20 48 6f 77 65 76 65 72 2c 20 79 6f 75 20 63 61 6e 20 61 6c 77 61 79 ......///.However,.you.can.alway
1580 73 20 69 6d 70 6c 65 6d 65 6e 74 20 79 6f 75 72 20 6f 77 6e 20 63 75 73 74 6f 6d 20 6c 6f 67 69 s.implement.your.own.custom.logi
15a0 63 20 69 6e 73 74 65 61 64 20 61 6e 64 20 73 69 6d 70 6c 79 20 69 6e 73 74 61 6e 74 69 61 74 65 c.instead.and.simply.instantiate
15c0 20 6d 75 6c 74 69 70 6c 65 20 47 61 6d 65 4f 62 6a 65 63 74 73 20 77 69 74 68 0d 0a 20 20 20 20 .multiple.GameObjects.with......
15e0 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 22 2f 3e 20 79 6f ///.<see.cref="PlayerInput"/>.yo
1600 75 72 73 65 6c 66 2e 0d 0a 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 urself.......///.</remarks>.....
1620 20 5b 41 64 64 43 6f 6d 70 6f 6e 65 6e 74 4d 65 6e 75 28 22 49 6e 70 75 74 2f 50 6c 61 79 65 72 .[AddComponentMenu("Input/Player
1640 20 49 6e 70 75 74 20 4d 61 6e 61 67 65 72 22 29 5d 0d 0a 20 20 20 20 70 75 62 6c 69 63 20 63 6c .Input.Manager")]......public.cl
1660 61 73 73 20 50 6c 61 79 65 72 49 6e 70 75 74 4d 61 6e 61 67 65 72 20 3a 20 4d 6f 6e 6f 42 65 68 ass.PlayerInputManager.:.MonoBeh
1680 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 75 6d 6d aviour......{..........///.<summ
16a0 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 20 6d 65 ary>..........///.Name.of.the.me
16c0 73 73 61 67 65 20 74 68 61 74 20 69 73 20 73 65 6e 74 20 77 68 65 6e 20 61 20 70 6c 61 79 65 72 ssage.that.is.sent.when.a.player
16e0 20 6a 6f 69 6e 73 20 74 68 65 20 67 61 6d 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f .joins.the.game...........///.</
1700 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 63 6f 6e 73 74 20 73 summary>..........public.const.s
1720 74 72 69 6e 67 20 50 6c 61 79 65 72 4a 6f 69 6e 65 64 4d 65 73 73 61 67 65 20 3d 20 22 4f 6e 50 tring.PlayerJoinedMessage.=."OnP
1740 6c 61 79 65 72 4a 6f 69 6e 65 64 22 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 layerJoined";............public.
1760 63 6f 6e 73 74 20 73 74 72 69 6e 67 20 50 6c 61 79 65 72 4c 65 66 74 4d 65 73 73 61 67 65 20 3d const.string.PlayerLeftMessage.=
1780 20 22 4f 6e 50 6c 61 79 65 72 4c 65 66 74 22 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 ."OnPlayerLeft";............///.
17a0 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 65 6e 61 62 6c 65 <summary>..........///.If.enable
17c0 64 2c 20 65 61 63 68 20 70 6c 61 79 65 72 20 77 69 6c 6c 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c d,.each.player.will.automaticall
17e0 79 20 62 65 20 61 73 73 69 67 6e 65 64 20 61 20 70 6f 72 74 69 6f 6e 20 6f 66 20 74 68 65 20 61 y.be.assigned.a.portion.of.the.a
1800 76 61 69 6c 61 62 6c 65 20 73 63 72 65 65 6e 20 61 72 65 61 2e 0d 0a 20 20 20 20 20 20 20 20 2f vailable.screen.area.........../
1820 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 65 6d 61 //.</summary>..........///.<rema
1840 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 46 6f 72 20 74 68 69 73 20 74 6f 20 77 6f rks>..........///.For.this.to.wo
1860 72 6b 2c 20 65 61 63 68 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c 61 79 65 72 49 6e 70 75 74 22 rk,.each.<see.cref="PlayerInput"
1880 2f 3e 20 63 6f 6d 70 6f 6e 65 6e 74 20 6d 75 73 74 20 68 61 76 65 20 61 6e 20 61 73 73 6f 63 69 />.component.must.have.an.associ
18a0 61 74 65 64 20 3c 73 65 65 20 63 72 65 66 3d 22 43 61 6d 65 72 61 22 2f 3e 0d 0a 20 20 20 20 20 ated.<see.cref="Camera"/>.......
18c0 20 20 20 2f 2f 2f 20 6f 62 6a 65 63 74 20 74 68 72 6f 75 67 68 20 3c 73 65 65 20 63 72 65 66 3d ...///.object.through.<see.cref=
18e0 22 50 6c 61 79 65 72 49 6e 70 75 74 2e 63 61 6d 65 72 61 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 "PlayerInput.camera"/>..........
1900 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 61 73 20 70 .///..........///.Note.that.as.p
1920 6c 61 79 65 72 20 6a 6f 69 6e 2c 20 74 68 65 20 73 63 72 65 65 6e 20 6d 61 79 20 62 65 20 69 6e layer.join,.the.screen.may.be.in
1940 63 72 65 61 73 69 6e 67 6c 79 20 73 75 62 64 69 76 69 64 65 64 20 61 6e 64 20 70 6c 61 79 65 72 creasingly.subdivided.and.player
1960 73 20 6d 61 79 20 73 65 65 20 74 68 65 69 72 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 70 72 65 s.may.see.their..........///.pre
1980 76 69 6f 75 73 20 73 63 72 65 65 6e 20 61 72 65 61 20 67 65 74 74 69 6e 67 20 72 65 73 69 7a 65 vious.screen.area.getting.resize
19a0 64 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 d...........///.</remarks>......
19c0 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 73 70 6c 69 74 53 63 72 65 65 6e 0d 0a 20 20 20 ....public.bool.splitScreen.....
19e0 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 53 70 6c .....{..............get.=>.m_Spl
1a00 69 74 53 63 72 65 65 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 0d 0a 20 20 20 20 itScreen;..............set......
1a20 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
1a40 5f 53 70 6c 69 74 53 63 72 65 65 6e 20 3d 3d 20 76 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 _SplitScreen.==.value)..........
1a60 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 20 20 ............return;.............
1a80 20 20 20 20 20 20 20 6d 5f 53 70 6c 69 74 53 63 72 65 65 6e 20 3d 20 76 61 6c 75 65 3b 0d 0a 0d .......m_SplitScreen.=.value;...
1aa0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f 53 70 6c 69 74 53 63 72 .................if.(!m_SplitScr
1ac0 65 65 6e 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 een)..................{.........
1ae0 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 52 65 73 65 74 20 72 65 63 74 73 20 6f 6e 20 61 .............//.Reset.rects.on.a
1b00 6c 6c 20 70 6c 61 79 65 72 20 63 61 6d 65 72 61 73 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 ll.player.cameras...............
1b20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 76 61 72 20 70 6c 61 79 65 72 20 69 6e 20 50 ........foreach.(var.player.in.P
1b40 6c 61 79 65 72 49 6e 70 75 74 2e 61 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 layerInput.all).................
1b60 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 .....{..........................
1b80 76 61 72 20 63 61 6d 65 72 61 20 3d 20 70 6c 61 79 65 72 2e 63 61 6d 65 72 61 3b 0d 0a 20 20 20 var.camera.=.player.camera;.....
1ba0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 61 6d 65 72 61 20 .....................if.(camera.
1bc0 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 !=.null)........................
1be0 20 20 20 20 20 20 63 61 6d 65 72 61 2e 72 65 63 74 20 3d 20 6e 65 77 20 52 65 63 74 28 30 2c 20 ......camera.rect.=.new.Rect(0,.
1c00 30 2c 20 31 2c 20 31 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 0,.1,.1);......................}
1c20 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 ..................}.............
1c40 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 7b 0d 0a 20 20 .....else..................{....
1c60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 55 70 64 61 74 65 53 70 6c 69 74 53 63 72 ..................UpdateSplitScr
1c80 65 65 6e 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 een();..................}.......
1ca0 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 .......}..........}............/
1cc0 2f 2f 2f 52 45 56 49 45 57 3a 20 77 65 20 70 72 6f 62 61 62 6c 79 20 6e 65 65 64 20 73 75 70 70 ///REVIEW:.we.probably.need.supp
1ce0 6f 72 74 20 66 6f 72 20 66 69 6c 6c 69 6e 67 20 75 6e 75 73 65 64 20 73 63 72 65 65 6e 20 61 72 ort.for.filling.unused.screen.ar
1d00 65 61 73 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c eas.automatically..........///.<
1d20 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 65 20 63 72 summary>..........///.If.<see.cr
1d40 65 66 3d 22 73 70 6c 69 74 53 63 72 65 65 6e 22 2f 3e 20 69 73 20 65 6e 61 62 6c 65 64 2c 20 74 ef="splitScreen"/>.is.enabled,.t
1d60 68 69 73 20 70 72 6f 70 65 72 74 79 20 64 65 74 65 72 6d 69 6e 65 73 20 77 68 65 74 68 65 72 20 his.property.determines.whether.
1d80 73 75 62 64 69 76 69 64 69 6e 67 20 74 68 65 20 73 63 72 65 65 6e 20 69 73 20 61 6c 6c 6f 77 65 subdividing.the.screen.is.allowe
1da0 64 20 74 6f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 70 72 6f 64 75 63 65 20 73 63 72 65 65 6e d.to..........///.produce.screen
1dc0 20 61 72 65 61 73 20 74 68 61 74 20 68 61 76 65 20 61 6e 20 61 73 70 65 63 74 20 72 61 74 69 6f .areas.that.have.an.aspect.ratio
1de0 20 64 69 66 66 65 72 65 6e 74 20 66 72 6f 6d 20 74 68 65 20 73 63 72 65 65 6e 20 72 65 73 6f 6c .different.from.the.screen.resol
1e00 75 74 69 6f 6e 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 ution...........///.</summary>..
1e20 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>........../
1e40 2f 2f 20 42 79 20 64 65 66 61 75 6c 74 2c 20 77 68 65 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 73 //.By.default,.when.<see.cref="s
1e60 70 6c 69 74 53 63 72 65 65 6e 22 2f 3e 20 69 73 20 65 6e 61 62 6c 65 64 2c 20 74 68 65 20 6d 61 plitScreen"/>.is.enabled,.the.ma
1e80 6e 61 67 65 72 20 77 69 6c 6c 20 61 64 64 20 6f 72 20 72 65 6d 6f 76 65 20 73 63 72 65 65 6e 20 nager.will.add.or.remove.screen.
1ea0 73 75 62 64 69 76 69 73 69 6f 6e 73 20 69 6e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 73 74 65 subdivisions.in..........///.ste
1ec0 70 73 20 6f 66 20 74 77 6f 2e 20 54 68 69 73 20 6d 65 61 6e 73 20 74 68 61 74 20 77 68 65 6e 2c ps.of.two..This.means.that.when,
1ee0 20 66 6f 72 20 65 78 61 6d 70 6c 65 2c 20 74 68 65 20 73 65 63 6f 6e 64 20 70 6c 61 79 65 72 20 .for.example,.the.second.player.
1f00 69 73 20 61 64 64 65 64 2c 20 74 68 65 20 73 63 72 65 65 6e 20 77 69 6c 6c 20 62 65 20 73 75 62 is.added,.the.screen.will.be.sub
1f20 64 69 76 69 64 65 64 20 69 6e 74 6f 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 20 6c 65 66 74 divided.into..........///.a.left
1f40 20 61 6e 64 20 61 20 72 69 67 68 74 20 73 63 72 65 65 6e 20 61 72 65 61 3b 20 74 68 65 20 6c 65 .and.a.right.screen.area;.the.le
1f60 66 74 20 6f 6e 65 20 61 6c 6c 6f 63 61 74 65 64 20 74 6f 20 74 68 65 20 66 69 72 73 74 20 70 6c ft.one.allocated.to.the.first.pl
1f80 61 79 65 72 20 61 6e 64 20 74 68 65 20 72 69 67 68 74 20 6f 6e 65 20 61 6c 6c 6f 63 61 74 65 64 ayer.and.the.right.one.allocated
1fa0 20 74 6f 20 74 68 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 73 65 63 6f 6e 64 20 70 6c 61 79 .to.the..........///.second.play
1fc0 65 72 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 54 68 er...........///..........///.Th
1fe0 69 73 20 62 65 68 61 76 69 6f 72 20 6d 61 6b 65 73 20 6f 70 74 69 6d 61 6c 20 75 73 65 20 6f 66 is.behavior.makes.optimal.use.of
2000 20 73 63 72 65 65 6e 20 72 65 61 6c 20 65 73 74 61 74 65 20 62 75 74 20 77 69 6c 6c 20 72 65 73 .screen.real.estate.but.will.res
2020 75 6c 74 20 69 6e 20 73 63 72 65 65 6e 20 61 72 65 61 73 20 74 68 61 74 20 68 61 76 65 20 61 73 ult.in.screen.areas.that.have.as
2040 70 65 63 74 20 72 61 74 69 6f 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 64 69 66 66 65 72 65 pect.ratios..........///.differe
2060 6e 74 20 66 72 6f 6d 20 74 68 65 20 73 63 72 65 65 6e 20 72 65 73 6f 6c 75 74 69 6f 6e 2e 20 49 nt.from.the.screen.resolution..I
2080 66 20 74 68 69 73 20 69 73 20 6e 6f 74 20 61 63 63 65 70 74 61 62 6c 65 2c 20 74 68 69 73 20 70 f.this.is.not.acceptable,.this.p
20a0 72 6f 70 65 72 74 79 20 63 61 6e 20 62 65 20 73 65 74 20 74 6f 20 74 72 75 65 20 74 6f 20 65 6e roperty.can.be.set.to.true.to.en
20c0 66 6f 72 63 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 73 70 6c 69 74 2d 73 63 72 65 65 6e 20 force..........///.split-screen.
20e0 74 6f 20 6f 6e 6c 79 20 63 72 65 61 74 65 20 73 63 72 65 65 6e 20 61 72 65 61 73 20 74 68 61 74 to.only.create.screen.areas.that
2100 20 68 61 76 65 20 74 68 65 20 73 61 6d 65 20 61 73 70 65 63 74 20 72 61 74 69 6f 20 6f 66 20 74 .have.the.same.aspect.ratio.of.t
2120 68 65 20 73 63 72 65 65 6e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d 0a 20 20 20 20 20 20 20 he.screen...........///.........
2140 20 2f 2f 2f 20 54 68 69 73 20 72 65 73 75 6c 74 73 20 69 6e 20 74 68 65 20 73 63 72 65 65 6e 20 .///.This.results.in.the.screen.
2160 62 65 69 6e 67 20 73 75 62 64 69 76 69 64 65 64 20 6d 6f 72 65 20 61 67 67 72 65 73 73 69 76 65 being.subdivided.more.aggressive
2180 6c 79 2e 20 57 68 65 6e 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 2c 20 61 20 73 65 63 6f 6e 64 20 ly..When,.for.example,.a.second.
21a0 70 6c 61 79 65 72 20 69 73 20 61 64 64 65 64 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 player.is.added,..........///.th
21c0 65 20 73 63 72 65 65 6e 20 77 69 6c 6c 20 69 6d 6d 65 64 69 61 74 65 6c 79 20 62 65 20 64 69 76 e.screen.will.immediately.be.div
21e0 69 64 65 64 20 69 6e 74 6f 20 61 20 66 6f 75 72 2d 77 61 79 20 73 70 6c 69 74 2d 73 63 72 65 65 ided.into.a.four-way.split-scree
2200 6e 20 73 65 74 75 70 20 77 69 74 68 20 74 68 65 20 6c 6f 77 65 72 20 74 77 6f 20 73 63 72 65 65 n.setup.with.the.lower.two.scree
2220 6e 20 61 72 65 61 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 6e 6f 74 20 62 65 69 6e 67 20 75 n.areas..........///.not.being.u
2240 73 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 20 2f 2f 2f 20 54 sed...........///..........///.T
2260 68 69 73 20 70 72 6f 70 65 72 74 79 20 69 73 20 69 72 72 65 6c 65 76 61 6e 74 20 69 66 20 3c 73 his.property.is.irrelevant.if.<s
2280 65 65 20 63 72 65 66 3d 22 66 69 78 65 64 4e 75 6d 62 65 72 4f 66 53 70 6c 69 74 53 63 72 65 65 ee.cref="fixedNumberOfSplitScree
22a0 6e 73 22 2f 3e 20 69 73 20 75 73 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 ns"/>.is.used...........///.</re
22c0 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 6d 61 69 6e marks>..........public.bool.main
22e0 74 61 69 6e 41 73 70 65 63 74 52 61 74 69 6f 49 6e 53 70 6c 69 74 53 63 72 65 65 6e 20 3d 3e 20 tainAspectRatioInSplitScreen.=>.
2300 6d 5f 4d 61 69 6e 74 61 69 6e 41 73 70 65 63 74 52 61 74 69 6f 49 6e 53 70 6c 69 74 53 63 72 65 m_MaintainAspectRatioInSplitScre
2320 65 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 69 6e 74 20 66 69 78 65 64 4e en;............public.int.fixedN
2340 75 6d 62 65 72 4f 66 53 70 6c 69 74 53 63 72 65 65 6e 73 20 3d 3e 20 6d 5f 46 69 78 65 64 4e 75 umberOfSplitScreens.=>.m_FixedNu
2360 6d 62 65 72 4f 66 53 70 6c 69 74 53 63 72 65 65 6e 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f mberOfSplitScreens;............/
2380 2f 2f 20 3c 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 6e 6f //.<summary>..........///.The.no
23a0 72 6d 61 6c 69 7a 65 64 20 73 63 72 65 65 6e 20 72 65 63 74 61 6e 67 6c 65 20 61 76 61 69 6c 61 rmalized.screen.rectangle.availa
23c0 62 6c 65 20 66 6f 72 20 61 6c 6c 6f 63 61 74 69 6e 67 20 70 6c 61 79 65 72 20 73 70 6c 69 74 2d ble.for.allocating.player.split-
23e0 73 63 72 65 65 6e 73 20 69 6e 74 6f 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d screens.into...........///.</sum
2400 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 0a 20 20 mary>..........///.<remarks>....
2420 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 69 73 20 6f 6e 6c 79 20 75 73 65 64 20 69 66 20 3c ......///.This.is.only.used.if.<
2440 73 65 65 20 63 72 65 66 3d 22 73 70 6c 69 74 53 63 72 65 65 6e 22 2f 3e 20 69 73 20 74 72 75 65 see.cref="splitScreen"/>.is.true
2460 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 64 ...........///..........///.By.d
2480 65 66 61 75 6c 74 20 69 74 20 69 73 20 73 65 74 20 74 6f 20 3c 63 3e 28 30 2c 30 2c 31 2c 31 29 efault.it.is.set.to.<c>(0,0,1,1)
24a0 3c 2f 63 3e 2c 20 69 2e 65 2e 20 74 68 65 20 65 6e 74 69 72 65 20 73 63 72 65 65 6e 20 61 72 65 </c>,.i.e..the.entire.screen.are
24c0 61 20 77 69 6c 6c 20 62 65 20 75 73 65 64 20 66 6f 72 20 70 6c 61 79 65 72 20 73 63 72 65 65 6e a.will.be.used.for.player.screen
24e0 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 49 66 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 2c s...........///.If,.for.example,
2500 20 70 61 72 74 20 6f 66 20 74 68 65 20 73 63 72 65 65 6e 20 73 68 6f 75 6c 64 20 64 69 73 70 6c .part.of.the.screen.should.displ
2520 61 79 20 61 20 55 49 2f 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 73 68 61 72 65 64 20 62 79 20 61 6c ay.a.UI/information.shared.by.al
2540 6c 20 70 6c 61 79 65 72 73 2c 20 74 68 69 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 70 72 6f l.players,.this..........///.pro
2560 70 65 72 74 79 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 63 75 74 20 6f 66 66 20 74 68 65 perty.can.be.used.to.cut.off.the
2580 20 61 72 65 61 20 61 6e 64 20 6e 6f 74 20 68 61 76 65 20 69 74 20 75 73 65 64 20 62 79 20 50 6c .area.and.not.have.it.used.by.Pl
25a0 61 79 65 72 49 6e 70 75 74 4d 61 6e 61 67 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c ayerInputManager...........///.<
25c0 2f 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 52 65 63 74 20 73 /remarks>..........public.Rect.s
25e0 70 6c 69 74 53 63 72 65 65 6e 41 72 65 61 20 3d 3e 20 6d 5f 53 70 6c 69 74 53 63 72 65 65 6e 52 plitScreenArea.=>.m_SplitScreenR
2600 65 63 74 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 ect;............///.<summary>...
2620 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 65 20 63 75 72 72 65 6e 74 20 6e 75 6d 62 65 72 20 6f 66 .......///.The.current.number.of
2640 20 61 63 74 69 76 65 20 70 6c 61 79 65 72 73 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f .active.players...........///.</
2660 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>.
2680 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 68 69 73 20 63 6f 75 6e 74 20 63 6f 72 72 65 73 70 6f .........///.This.count.correspo
26a0 6e 64 73 20 74 6f 20 61 6c 6c 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c 61 79 65 72 49 6e 70 75 nds.to.all.<see.cref="PlayerInpu
26c0 74 22 2f 3e 20 69 6e 73 74 61 6e 63 65 73 20 74 68 61 74 20 61 72 65 20 63 75 72 72 65 6e 74 6c t"/>.instances.that.are.currentl
26e0 79 20 65 6e 61 62 6c 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b y.enabled...........///.</remark
2700 73 3e 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 43 6f 75 s>..........public.int.playerCou
2720 6e 74 20 3d 3e 20 50 6c 61 79 65 72 49 6e 70 75 74 2e 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 nt.=>.PlayerInput.s_AllActivePla
2740 79 65 72 73 43 6f 75 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 yersCount;............///.<summa
2760 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4d 61 78 69 6d 75 6d 20 6e 75 6d 62 65 72 20 ry>..........///.Maximum.number.
2780 6f 66 20 70 6c 61 79 65 72 73 20 61 6c 6c 6f 77 65 64 20 63 6f 6e 63 75 72 72 65 6e 74 6c 79 20 of.players.allowed.concurrently.
27a0 69 6e 20 74 68 65 20 67 61 6d 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d in.the.game...........///.</summ
27c0 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 0a 20 20 20 ary>..........///.<remarks>.....
27e0 20 20 20 20 20 2f 2f 2f 20 49 66 20 74 68 69 73 20 6c 69 6d 69 74 20 69 73 20 72 65 61 63 68 65 .....///.If.this.limit.is.reache
2800 64 2c 20 6a 6f 69 6e 69 6e 67 20 69 73 20 74 75 72 6e 65 64 20 6f 66 66 20 61 75 74 6f 6d 61 74 d,.joining.is.turned.off.automat
2820 69 63 61 6c 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 ically...........///..........//
2840 2f 20 42 79 20 64 65 66 61 75 6c 74 20 74 68 69 73 20 69 73 20 73 65 74 20 74 6f 20 2d 31 2e 20 /.By.default.this.is.set.to.-1..
2860 41 6e 79 20 6e 65 67 61 74 69 76 65 20 76 61 6c 75 65 20 64 65 61 63 74 69 76 61 74 65 73 20 74 Any.negative.value.deactivates.t
2880 68 65 20 70 6c 61 79 65 72 20 6c 69 6d 69 74 20 61 6e 64 20 61 6c 6c 6f 77 73 0d 0a 20 20 20 20 he.player.limit.and.allows......
28a0 20 20 20 20 2f 2f 2f 20 61 72 62 69 74 72 61 72 79 20 6d 61 6e 79 20 70 6c 61 79 65 72 73 20 74 ....///.arbitrary.many.players.t
28c0 6f 20 6a 6f 69 6e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 72 65 6d 61 72 6b 73 3e 0d o.join...........///.</remarks>.
28e0 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 69 6e 74 20 6d 61 78 50 6c 61 79 65 72 43 6f 75 .........public.int.maxPlayerCou
2900 6e 74 20 3d 3e 20 6d 5f 4d 61 78 50 6c 61 79 65 72 43 6f 75 6e 74 3b 0d 0a 0d 0a 20 20 20 20 20 nt.=>.m_MaxPlayerCount;.........
2920 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 57 68 ...///.<summary>..........///.Wh
2940 65 74 68 65 72 20 6e 65 77 20 70 6c 61 79 65 72 73 20 63 61 6e 20 63 75 72 72 65 6e 74 6c 79 20 ether.new.players.can.currently.
2960 6a 6f 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 79 3e 0d 0a 20 join...........///.</summary>...
2980 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 2f .......///.<remarks>..........//
29a0 2f 20 57 68 69 6c 65 20 74 68 69 73 20 69 73 20 74 72 75 65 2c 20 6e 65 77 20 70 6c 61 79 65 72 /.While.this.is.true,.new.player
29c0 73 20 63 61 6e 20 6a 6f 69 6e 20 76 69 61 20 74 68 65 20 6d 65 63 68 61 6e 69 73 6d 20 64 65 74 s.can.join.via.the.mechanism.det
29e0 65 72 6d 69 6e 65 64 20 62 79 20 3c 73 65 65 20 63 72 65 66 3d 22 6a 6f 69 6e 42 65 68 61 76 69 ermined.by.<see.cref="joinBehavi
2a00 6f 72 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 0a or"/>...........///.</remarks>..
2a20 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 45 6e 61 62 6c ........///.<seealso.cref="Enabl
2a40 65 4a 6f 69 6e 69 6e 67 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 eJoining"/>..........///.<seeals
2a60 6f 20 63 72 65 66 3d 22 44 69 73 61 62 6c 65 4a 6f 69 6e 69 6e 67 22 2f 3e 0d 0a 20 20 20 20 20 o.cref="DisableJoining"/>.......
2a80 20 20 20 70 75 62 6c 69 63 20 62 6f 6f 6c 20 6a 6f 69 6e 69 6e 67 45 6e 61 62 6c 65 64 20 3d 3e ...public.bool.joiningEnabled.=>
2aa0 20 6d 5f 41 6c 6c 6f 77 4a 6f 69 6e 69 6e 67 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 .m_AllowJoining;............///.
2ac0 3c 73 75 6d 6d 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 <summary>..........///.Determine
2ae0 73 20 74 68 65 20 6d 65 63 68 61 6e 69 73 6d 20 62 79 20 77 68 69 63 68 20 70 6c 61 79 65 72 73 s.the.mechanism.by.which.players
2b00 20 63 61 6e 20 6a 6f 69 6e 20 77 68 65 6e 20 6a 6f 69 6e 69 6e 67 20 69 73 20 65 6e 61 62 6c 65 .can.join.when.joining.is.enable
2b20 64 20 28 3c 73 65 65 20 63 72 65 66 3d 22 6a 6f 69 6e 69 6e 67 45 6e 61 62 6c 65 64 22 2f 3e 29 d.(<see.cref="joiningEnabled"/>)
2b40 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>.......
2b60 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 2f ...///.<remarks>..........///.</
2b80 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 50 6c 61 79 65 72 4a remarks>..........public.PlayerJ
2ba0 6f 69 6e 42 65 68 61 76 69 6f 72 20 6a 6f 69 6e 42 65 68 61 76 69 6f 72 0d 0a 20 20 20 20 20 20 oinBehavior.joinBehavior........
2bc0 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 4a 6f 69 6e 42 65 ..{..............get.=>.m_JoinBe
2be0 68 61 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 havior;..............set........
2c00 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 5f 4a ......{..................if.(m_J
2c20 6f 69 6e 42 65 68 61 76 69 6f 72 20 3d 3d 20 76 61 6c 75 65 29 0d 0a 20 20 20 20 20 20 20 20 20 oinBehavior.==.value)...........
2c40 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 20 20 20 ...........return;..............
2c60 20 20 20 20 20 20 76 61 72 20 6a 6f 69 6e 69 6e 67 45 6e 61 62 6c 65 64 20 3d 20 6d 5f 41 6c 6c ......var.joiningEnabled.=.m_All
2c80 6f 77 4a 6f 69 6e 69 6e 67 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 owJoining;..................if.(
2ca0 6a 6f 69 6e 69 6e 67 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 joiningEnabled).................
2cc0 20 20 20 20 20 44 69 73 61 62 6c 65 4a 6f 69 6e 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 .....DisableJoining();..........
2ce0 20 20 20 20 20 20 20 20 6d 5f 4a 6f 69 6e 42 65 68 61 76 69 6f 72 20 3d 20 76 61 6c 75 65 3b 0d ........m_JoinBehavior.=.value;.
2d00 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6a 6f 69 6e 69 6e 67 45 6e 61 62 .................if.(joiningEnab
2d20 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 45 6e 61 62 6c 65 led)......................Enable
2d40 4a 6f 69 6e 69 6e 67 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 Joining();..............}.......
2d60 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 49 6e 70 75 74 41 63 74 69 ...}............public.InputActi
2d80 6f 6e 50 72 6f 70 65 72 74 79 20 6a 6f 69 6e 41 63 74 69 6f 6e 0d 0a 20 20 20 20 20 20 20 20 7b onProperty.joinAction..........{
2da0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 20 3d 3e 20 6d 5f 4a 6f 69 6e 41 63 74 69 6f ..............get.=>.m_JoinActio
2dc0 6e 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 n;..............set.............
2de0 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 4a 6f 69 6e 41 63 .{..................if.(m_JoinAc
2e00 74 69 6f 6e 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 tion.==.value)..................
2e20 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 2f ....return;..................../
2e40 2f 2f 2f 52 45 56 49 45 57 3a 20 73 68 6f 75 6c 64 20 77 65 20 73 75 70 70 72 65 73 73 20 6e 6f ///REVIEW:.should.we.suppress.no
2e60 74 69 66 69 63 61 74 69 6f 6e 73 20 66 6f 72 20 74 65 6d 70 6f 72 61 72 79 20 64 69 73 61 62 6c tifications.for.temporary.disabl
2e80 65 73 3f 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6a 6f 69 6e 45 es?....................var.joinE
2ea0 6e 61 62 6c 65 64 20 3d 20 6d 5f 41 6c 6c 6f 77 4a 6f 69 6e 69 6e 67 20 26 26 20 6d 5f 4a 6f 69 nabled.=.m_AllowJoining.&&.m_Joi
2ec0 6e 42 65 68 61 76 69 6f 72 20 3d 3d 20 50 6c 61 79 65 72 4a 6f 69 6e 42 65 68 61 76 69 6f 72 2e nBehavior.==.PlayerJoinBehavior.
2ee0 4a 6f 69 6e 50 6c 61 79 65 72 73 57 68 65 6e 4a 6f 69 6e 41 63 74 69 6f 6e 49 73 54 72 69 67 67 JoinPlayersWhenJoinActionIsTrigg
2f00 65 72 65 64 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6a 6f 69 6e 45 ered;..................if.(joinE
2f20 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 20 20 20 44 69 73 nabled)......................Dis
2f40 61 62 6c 65 4a 6f 69 6e 69 6e 67 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ableJoining();..................
2f60 20 20 6d 5f 4a 6f 69 6e 41 63 74 69 6f 6e 20 3d 20 76 61 6c 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 ..m_JoinAction.=.value;.........
2f80 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6a 6f 69 6e 45 6e 61 62 6c 65 64 29 0d 0a 20 20 20 ...........if.(joinEnabled).....
2fa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 61 62 6c 65 4a 6f 69 6e 69 6e 67 28 29 .................EnableJoining()
2fc0 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 ;..............}..........}.....
2fe0 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e .......public.PlayerNotification
3000 73 20 6e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 0d 0a 20 20 20 20 20 20 20 20 s.notificationBehavior..........
3020 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 20 3d 3e 20 6d 5f 4e 6f 74 69 66 69 63 61 {..............get.=>.m_Notifica
3040 74 69 6f 6e 42 65 68 61 76 69 6f 72 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 65 74 20 3d tionBehavior;..............set.=
3060 3e 20 6d 5f 4e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 20 3d 20 76 61 6c 75 65 >.m_NotificationBehavior.=.value
3080 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 50 ;..........}............public.P
30a0 6c 61 79 65 72 4a 6f 69 6e 65 64 45 76 65 6e 74 20 70 6c 61 79 65 72 4a 6f 69 6e 65 64 45 76 65 layerJoinedEvent.playerJoinedEve
30c0 6e 74 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 0d 0a nt..........{..............get..
30e0 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
3100 66 20 28 6d 5f 50 6c 61 79 65 72 4a 6f 69 6e 65 64 45 76 65 6e 74 20 3d 3d 20 6e 75 6c 6c 29 0d f.(m_PlayerJoinedEvent.==.null).
3120 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 4a 6f 69 .....................m_PlayerJoi
3140 6e 65 64 45 76 65 6e 74 20 3d 20 6e 65 77 20 50 6c 61 79 65 72 4a 6f 69 6e 65 64 45 76 65 6e 74 nedEvent.=.new.PlayerJoinedEvent
3160 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 50 6c ();..................return.m_Pl
3180 61 79 65 72 4a 6f 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 ayerJoinedEvent;..............}.
31a0 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 50 6c 61 .........}............public.Pla
31c0 79 65 72 4c 65 66 74 45 76 65 6e 74 20 70 6c 61 79 65 72 4c 65 66 74 45 76 65 6e 74 0d 0a 20 20 yerLeftEvent.playerLeftEvent....
31e0 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 20 20 ......{..............get........
3200 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 5f 50 ......{..................if.(m_P
3220 6c 61 79 65 72 4c 65 66 74 45 76 65 6e 74 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 layerLeftEvent.==.null).........
3240 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 50 6c 61 79 65 72 4c 65 66 74 45 76 65 6e 74 20 3d .............m_PlayerLeftEvent.=
3260 20 6e 65 77 20 50 6c 61 79 65 72 4c 65 66 74 45 76 65 6e 74 28 29 3b 0d 0a 20 20 20 20 20 20 20 .new.PlayerLeftEvent();.........
3280 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6d 5f 50 6c 61 79 65 72 4c 65 66 74 45 76 65 6e .........return.m_PlayerLeftEven
32a0 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a t;..............}..........}....
32c0 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 6c 61 79 ........public.event.Action<Play
32e0 65 72 49 6e 70 75 74 3e 20 6f 6e 50 6c 61 79 65 72 4a 6f 69 6e 65 64 0d 0a 20 20 20 20 20 20 20 erInput>.onPlayerJoined.........
3300 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 20 20 .{..............add.............
3320 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 3d 3d .{..................if.(value.==
3340 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
3360 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
3380 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 5f 50 of(value));..................m_P
33a0 6c 61 79 65 72 4a 6f 69 6e 65 64 43 61 6c 6c 62 61 63 6b 73 2e 41 70 70 65 6e 64 57 69 74 68 43 layerJoinedCallbacks.AppendWithC
33c0 61 70 61 63 69 74 79 28 76 61 6c 75 65 2c 20 34 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 apacity(value,.4);..............
33e0 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 20 20 20 20 20 }..............remove...........
3400 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.
3420 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
3440 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
3460 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 76 meof(value));..................v
3480 61 72 20 69 6e 64 65 78 20 3d 20 6d 5f 50 6c 61 79 65 72 4a 6f 69 6e 65 64 43 61 6c 6c 62 61 63 ar.index.=.m_PlayerJoinedCallbac
34a0 6b 73 2e 49 6e 64 65 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 ks.IndexOf(value);..............
34c0 20 20 20 20 69 66 20 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 ....if.(index.!=.-1)............
34e0 20 20 20 20 20 20 20 20 20 20 6d 5f 50 6c 61 79 65 72 4a 6f 69 6e 65 64 43 61 6c 6c 62 61 63 6b ..........m_PlayerJoinedCallback
3500 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 65 78 29 3b 0d 0a s.RemoveAtWithCapacity(index);..
3520 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 20 20 ............}..........}........
3540 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 6c 61 79 65 72 49 6e ....public.event.Action<PlayerIn
3560 70 75 74 3e 20 6f 6e 50 6c 61 79 65 72 4c 65 66 74 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 put>.onPlayerLeft..........{....
3580 20 20 20 20 20 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 ..........add..............{....
35a0 20 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 ..............if.(value.==.null)
35c0 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 77 20 6e 65 77 20 ......................throw.new.
35e0 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 66 28 76 61 6c ArgumentNullException(nameof(val
3600 75 65 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 50 6c 61 79 65 72 4c ue));..................m_PlayerL
3620 65 66 74 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 eftCallbacks.AppendWithCapacity(
3640 76 61 6c 75 65 2c 20 34 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 value,.4);..............}.......
3660 20 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 .......remove..............{....
3680 20 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 ..............if.(value.==.null)
36a0 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 77 20 6e 65 77 20 ......................throw.new.
36c0 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 66 28 76 61 6c ArgumentNullException(nameof(val
36e0 75 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 ue));..................var.index
3700 20 3d 20 6d 5f 50 6c 61 79 65 72 4c 65 66 74 43 61 6c 6c 62 61 63 6b 73 2e 49 6e 64 65 78 4f 66 .=.m_PlayerLeftCallbacks.IndexOf
3720 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 28 69 6e (value);..................if.(in
3740 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 20 20 20 dex.!=.-1)......................
3760 6d 5f 50 6c 61 79 65 72 4c 65 66 74 43 61 6c 6c 62 61 63 6b 73 2e 52 65 6d 6f 76 65 41 74 57 69 m_PlayerLeftCallbacks.RemoveAtWi
3780 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 20 20 20 20 20 20 20 thCapacity(index);..............
37a0 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 20 3c 73 75 6d }..........}............///.<sum
37c0 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 52 65 66 65 72 65 6e 63 65 20 74 6f 20 mary>..........///.Reference.to.
37e0 74 68 65 20 70 72 65 66 61 62 20 74 68 61 74 20 74 68 65 20 6d 61 6e 61 67 65 72 20 77 69 6c 6c the.prefab.that.the.manager.will
3800 20 69 6e 73 74 61 6e 74 69 61 74 65 20 77 68 65 6e 20 70 6c 61 79 65 72 73 20 6a 6f 69 6e 2e 0d .instantiate.when.players.join..
3820 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 .........///.</summary>.........
3840 20 2f 2f 2f 20 3c 76 61 6c 75 65 3e 50 72 65 66 61 62 20 74 6f 20 69 6e 73 74 61 6e 74 69 61 74 .///.<value>Prefab.to.instantiat
3860 65 20 66 6f 72 20 6e 65 77 20 70 6c 61 79 65 72 73 2e 3c 2f 76 61 6c 75 65 3e 0d 0a 20 20 20 20 e.for.new.players.</value>......
3880 20 20 20 20 70 75 62 6c 69 63 20 47 61 6d 65 4f 62 6a 65 63 74 20 70 6c 61 79 65 72 50 72 65 66 ....public.GameObject.playerPref
38a0 61 62 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 20 3d ab..........{..............get.=
38c0 3e 20 6d 5f 50 6c 61 79 65 72 50 72 65 66 61 62 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 >.m_PlayerPrefab;..............s
38e0 65 74 20 3d 3e 20 6d 5f 50 6c 61 79 65 72 50 72 65 66 61 62 20 3d 20 76 61 6c 75 65 3b 0d 0a 20 et.=>.m_PlayerPrefab.=.value;...
3900 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
3920 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 69 6e 67 6c 65 74 6f 6e 20 69 6e 73 74 61 6e 63 >..........///.Singleton.instanc
3940 65 20 6f 66 20 74 68 65 20 6d 61 6e 61 67 65 72 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c e.of.the.manager...........///.<
3960 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 53 69 /summary>..........///.<value>Si
3980 6e 67 6c 65 74 6f 6e 20 69 6e 73 74 61 6e 63 65 20 6f 72 20 6e 75 6c 6c 2e 3c 2f 76 61 6c 75 65 ngleton.instance.or.null.</value
39a0 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 49 >..........public.static.PlayerI
39c0 6e 70 75 74 4d 61 6e 61 67 65 72 20 69 6e 73 74 61 6e 63 65 20 7b 20 67 65 74 3b 20 70 72 69 76 nputManager.instance.{.get;.priv
39e0 61 74 65 20 73 65 74 3b 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 75 6d 6d 61 ate.set;.}............///.<summa
3a00 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 41 6c 6c 6f 77 20 70 6c 61 79 65 72 73 20 74 ry>..........///.Allow.players.t
3a20 6f 20 6a 6f 69 6e 20 74 68 65 20 67 61 6d 65 20 62 61 73 65 64 20 6f 6e 20 3c 73 65 65 20 63 72 o.join.the.game.based.on.<see.cr
3a40 65 66 3d 22 6a 6f 69 6e 42 65 68 61 76 69 6f 72 22 2f 3e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f ef="joinBehavior"/>...........//
3a60 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 65 61 6c /.</summary>..........///.<seeal
3a80 73 6f 20 63 72 65 66 3d 22 44 69 73 61 62 6c 65 4a 6f 69 6e 69 6e 67 22 2f 3e 0d 0a 20 20 20 20 so.cref="DisableJoining"/>......
3aa0 20 20 20 20 2f 2f 2f 20 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 6a 6f 69 6e 69 6e 67 45 6e ....///.<seealso.cref="joiningEn
3ac0 61 62 6c 65 64 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 45 6e abled"/>..........public.void.En
3ae0 61 62 6c 65 4a 6f 69 6e 69 6e 67 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 ableJoining()..........{........
3b00 20 20 20 20 20 20 73 77 69 74 63 68 20 28 6d 5f 4a 6f 69 6e 42 65 68 61 76 69 6f 72 29 0d 0a 20 ......switch.(m_JoinBehavior)...
3b20 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 61 ...........{..................ca
3b40 73 65 20 50 6c 61 79 65 72 4a 6f 69 6e 42 65 68 61 76 69 6f 72 2e 4a 6f 69 6e 50 6c 61 79 65 72 se.PlayerJoinBehavior.JoinPlayer
3b60 73 57 68 65 6e 42 75 74 74 6f 6e 49 73 50 72 65 73 73 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 sWhenButtonIsPressed:...........
3b80 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 ...........if.(!m_UnpairedDevice
3ba0 55 73 65 64 44 65 6c 65 67 61 74 65 48 6f 6f 6b 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 UsedDelegateHooked).............
3bc0 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 .........{......................
3be0 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 44 65 6c 65 ....if.(m_UnpairedDeviceUsedDele
3c00 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 20 20 20 20 gate.==.null)...................
3c20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 55 73 65 64 44 ...........m_UnpairedDeviceUsedD
3c40 65 6c 65 67 61 74 65 20 3d 20 4f 6e 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 55 73 65 64 3b 0d elegate.=.OnUnpairedDeviceUsed;.
3c60 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 6e 70 75 74 55 73 .........................InputUs
3c80 65 72 2e 6f 6e 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 55 73 65 64 20 2b 3d 20 6d 5f 55 6e 70 er.onUnpairedDeviceUsed.+=.m_Unp
3ca0 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 20 20 20 20 20 airedDeviceUsedDelegate;........
3cc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 55 6e 70 61 69 72 65 64 44 65 76 69 ..................m_UnpairedDevi
3ce0 63 65 55 73 65 64 44 65 6c 65 67 61 74 65 48 6f 6f 6b 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 ceUsedDelegateHooked.=.true;....
3d00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2b 2b 49 6e 70 75 74 55 73 65 ......................++InputUse
3d20 72 2e 6c 69 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 r.listenForUnpairedDeviceActivit
3d40 79 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 y;......................}.......
3d60 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 20 ...............break;...........
3d80 20 20 20 20 20 20 20 20 20 63 61 73 65 20 50 6c 61 79 65 72 4a 6f 69 6e 42 65 68 61 76 69 6f 72 .........case.PlayerJoinBehavior
3da0 2e 4a 6f 69 6e 50 6c 61 79 65 72 73 57 68 65 6e 4a 6f 69 6e 41 63 74 69 6f 6e 49 73 54 72 69 67 .JoinPlayersWhenJoinActionIsTrig
3dc0 67 65 72 65 64 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 48 gered:......................//.H
3de0 6f 6f 6b 20 69 6e 74 6f 20 6a 6f 69 6e 20 61 63 74 69 6f 6e 20 69 66 20 77 65 20 68 61 76 65 20 ook.into.join.action.if.we.have.
3e00 6f 6e 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f one.......................if.(m_
3e20 4a 6f 69 6e 41 63 74 69 6f 6e 2e 61 63 74 69 6f 6e 20 21 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 JoinAction.action.!=.null)......
3e40 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 ................{...............
3e60 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f 4a 6f 69 6e 41 63 74 69 6f 6e 44 65 6c 65 ...........if.(!m_JoinActionDele
3e80 67 61 74 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 20 20 20 gateHooked).....................
3ea0 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 .....{..........................
3ec0 20 20 20 20 69 66 20 28 6d 5f 4a 6f 69 6e 41 63 74 69 6f 6e 44 65 6c 65 67 61 74 65 20 3d 3d 20 ....if.(m_JoinActionDelegate.==.
3ee0 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 20 20 null)...........................
3f00 20 20 20 20 20 20 20 6d 5f 4a 6f 69 6e 41 63 74 69 6f 6e 44 65 6c 65 67 61 74 65 20 3d 20 4a 6f .......m_JoinActionDelegate.=.Jo
3f20 69 6e 50 6c 61 79 65 72 46 72 6f 6d 41 63 74 69 6f 6e 49 66 4e 6f 74 41 6c 72 65 61 64 79 4a 6f inPlayerFromActionIfNotAlreadyJo
3f40 69 6e 65 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 20 20 20 20 ined;...........................
3f60 20 20 20 6d 5f 4a 6f 69 6e 41 63 74 69 6f 6e 2e 61 63 74 69 6f 6e 2e 70 65 72 66 6f 72 6d 65 64 ...m_JoinAction.action.performed
3f80 20 2b 3d 20 6d 5f 4a 6f 69 6e 41 63 74 69 6f 6e 44 65 6c 65 67 61 74 65 3b 0d 0a 20 20 20 20 20 .+=.m_JoinActionDelegate;.......
3fa0 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 4a 6f 69 6e 41 63 74 .......................m_JoinAct
3fc0 69 6f 6e 44 65 6c 65 67 61 74 65 48 6f 6f 6b 65 64 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 ionDelegateHooked.=.true;.......
3fe0 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 ...................}............
4000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4a 6f 69 6e 41 63 74 69 6f 6e 2e 61 63 74 69 6f ..............m_JoinAction.actio
4020 6e 2e 45 6e 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 n.Enable();.....................
4040 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d 0a 20 20 .}......................else....
4060 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ..................{.............
4080 20 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 4c 6f 67 45 72 72 6f 72 28 0d 0a 20 20 .............Debug.LogError(....
40a0 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 22 4e 6f 20 6a 6f .........................."No.jo
40c0 69 6e 20 61 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 64 20 6f 6e 20 50 6c 61 79 65 72 49 6e in.action.configured.on.PlayerIn
40e0 70 75 74 4d 61 6e 61 67 65 72 20 62 75 74 20 6a 6f 69 6e 20 62 65 68 61 76 69 6f 72 20 69 73 20 putManager.but.join.behavior.is.
4100 73 65 74 20 74 6f 20 4a 6f 69 6e 50 6c 61 79 65 72 73 57 68 65 6e 41 63 74 69 6f 6e 49 73 54 72 set.to.JoinPlayersWhenActionIsTr
4120 69 67 67 65 72 65 64 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 iggered",.......................
4140 20 20 20 20 20 20 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 20 .......this);...................
4160 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 65 61 6b 3b ...}......................break;
4180 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 6d ..............}................m
41a0 5f 41 6c 6c 6f 77 4a 6f 69 6e 69 6e 67 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d _AllowJoining.=.true;..........}
41c0 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>.......
41e0 20 20 20 2f 2f 2f 20 49 6e 68 69 62 69 74 20 70 6c 61 79 65 72 73 20 66 72 6f 6d 20 6a 6f 69 6e ...///.Inhibit.players.from.join
4200 69 6e 67 20 74 68 65 20 67 61 6d 65 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d ing.the.game...........///.</sum
4220 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 65 66 mary>..........///.<seealso.cref
4240 3d 22 45 6e 61 62 6c 65 4a 6f 69 6e 69 6e 67 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 ="EnableJoining"/>..........///.
4260 3c 73 65 65 61 6c 73 6f 20 63 72 65 66 3d 22 6a 6f 69 6e 69 6e 67 45 6e 61 62 6c 65 64 22 2f 3e <seealso.cref="joiningEnabled"/>
4280 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 44 69 73 61 62 6c 65 4a 6f 69 ..........public.void.DisableJoi
42a0 6e 69 6e 67 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 ning()..........{..............s
42c0 77 69 74 63 68 20 28 6d 5f 4a 6f 69 6e 42 65 68 61 76 69 6f 72 29 0d 0a 20 20 20 20 20 20 20 20 witch.(m_JoinBehavior)..........
42e0 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 79 ....{..................case.Play
4300 65 72 4a 6f 69 6e 42 65 68 61 76 69 6f 72 2e 4a 6f 69 6e 50 6c 61 79 65 72 73 57 68 65 6e 42 75 erJoinBehavior.JoinPlayersWhenBu
4320 74 74 6f 6e 49 73 50 72 65 73 73 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ttonIsPressed:..................
4340 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 44 65 6c 65 ....if.(m_UnpairedDeviceUsedDele
4360 67 61 74 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 20 20 20 gateHooked).....................
4380 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 49 6e 70 75 .{..........................Inpu
43a0 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 6d 5f tUser.onUnpairedDeviceUsed.-=.m_
43c0 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 20 20 UnpairedDeviceUsedDelegate;.....
43e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 55 6e 70 61 69 72 65 64 44 .....................m_UnpairedD
4400 65 76 69 63 65 55 73 65 64 44 65 6c 65 67 61 74 65 48 6f 6f 6b 65 64 20 3d 20 66 61 6c 73 65 3b eviceUsedDelegateHooked.=.false;
4420 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 2d 2d 49 6e 70 75 ..........................--Inpu
4440 74 55 73 65 72 2e 6c 69 73 74 65 6e 46 6f 72 55 6e 70 61 69 72 65 64 44 65 76 69 63 65 41 63 74 tUser.listenForUnpairedDeviceAct
4460 69 76 69 74 79 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 ivity;......................}...
4480 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 0a 20 20 20 ...................break;.......
44a0 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 73 65 20 50 6c 61 79 65 72 4a 6f 69 6e 42 65 68 61 .............case.PlayerJoinBeha
44c0 76 69 6f 72 2e 4a 6f 69 6e 50 6c 61 79 65 72 73 57 68 65 6e 4a 6f 69 6e 41 63 74 69 6f 6e 49 73 vior.JoinPlayersWhenJoinActionIs
44e0 54 72 69 67 67 65 72 65 64 3a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 Triggered:......................
4500 69 66 20 28 6d 5f 4a 6f 69 6e 41 63 74 69 6f 6e 44 65 6c 65 67 61 74 65 48 6f 6f 6b 65 64 29 0d if.(m_JoinActionDelegateHooked).
4520 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 .....................{..........
4540 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6a 6f 69 6e 41 63 74 69 6f 6e 20 3d ................var.joinAction.=
4560 20 6d 5f 4a 6f 69 6e 41 63 74 69 6f 6e 2e 61 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 .m_JoinAction.action;...........
4580 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6a 6f 69 6e 41 63 74 69 6f 6e 20 21 3d ...............if.(joinAction.!=
45a0 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 20 .null)..........................
45c0 20 20 20 20 6d 5f 4a 6f 69 6e 41 63 74 69 6f 6e 2e 61 63 74 69 6f 6e 2e 70 65 72 66 6f 72 6d 65 ....m_JoinAction.action.performe
45e0 64 20 2d 3d 20 6d 5f 4a 6f 69 6e 41 63 74 69 6f 6e 44 65 6c 65 67 61 74 65 3b 0d 0a 20 20 20 20 d.-=.m_JoinActionDelegate;......
4600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 4a 6f 69 6e 41 63 74 69 6f 6e ....................m_JoinAction
4620 44 65 6c 65 67 61 74 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 DelegateHooked.=.false;.........
4640 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 .............}..................
4660 20 20 20 20 6d 5f 4a 6f 69 6e 41 63 74 69 6f 6e 2e 61 63 74 69 6f 6e 3f 2e 44 69 73 61 62 6c 65 ....m_JoinAction.action?.Disable
4680 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 6b 3b 0d ();......................break;.
46a0 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 6d 5f .............}................m_
46c0 41 6c 6c 6f 77 4a 6f 69 6e 69 6e 67 20 3d 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d AllowJoining.=.false;..........}
46e0 0d 0a 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 2f 54 4f 44 4f 0d 0a 20 20 20 20 20 20 20 20 2f 2f ............////TODO..........//
4700 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 4a 6f 69 6e 20 61 20 /.<summary>..........///.Join.a.
4720 6e 65 77 20 70 6c 61 79 65 72 20 62 61 73 65 64 20 6f 6e 20 69 6e 70 75 74 20 6f 6e 20 61 20 55 new.player.based.on.input.on.a.U
4740 49 20 65 6c 65 6d 65 6e 74 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 I.element...........///.</summar
4760 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>.......
4780 20 20 20 2f 2f 2f 20 54 68 69 73 20 73 68 6f 75 6c 64 20 62 65 20 63 61 6c 6c 65 64 20 64 69 72 ...///.This.should.be.called.dir
47a0 65 63 74 6c 79 20 66 72 6f 6d 20 61 20 55 49 20 63 61 6c 6c 62 61 63 6b 20 73 75 63 68 20 61 73 ectly.from.a.UI.callback.such.as
47c0 20 3c 73 65 65 20 63 72 65 66 3d 22 42 75 74 74 6f 6e 2e 6f 6e 43 6c 69 63 6b 22 2f 3e 2e 20 54 .<see.cref="Button.onClick"/>..T
47e0 68 65 20 64 65 76 69 63 65 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 61 74 20 74 68 65 20 he.device..........///.that.the.
4800 70 6c 61 79 65 72 20 6a 6f 69 6e 73 20 77 69 74 68 20 69 73 20 74 61 6b 65 6e 20 66 72 6f 6d 20 player.joins.with.is.taken.from.
4820 74 68 65 20 64 65 76 69 63 65 20 74 68 61 74 20 77 61 73 20 75 73 65 64 20 74 6f 20 69 6e 74 65 the.device.that.was.used.to.inte
4840 72 61 63 74 20 77 69 74 68 20 74 68 65 20 55 49 20 65 6c 65 6d 65 6e 74 2e 0d 0a 20 20 20 20 20 ract.with.the.UI.element........
4860 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 69 6e 74 65 72 ...///.</remarks>..........inter
4880 6e 61 6c 20 76 6f 69 64 20 4a 6f 69 6e 50 6c 61 79 65 72 46 72 6f 6d 55 49 28 29 0d 0a 20 20 20 nal.void.JoinPlayerFromUI().....
48a0 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 43 68 65 63 6b 49 66 .....{..............if.(!CheckIf
48c0 50 6c 61 79 65 72 43 61 6e 4a 6f 69 6e 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 PlayerCanJoin())................
48e0 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 66 69 6e 64 20 ..return;................//find.
4900 75 73 65 64 20 64 65 76 69 63 65 3b 20 49 6e 70 75 74 53 79 73 74 65 6d 55 49 49 6e 70 75 74 4d used.device;.InputSystemUIInputM
4920 6f 64 75 6c 65 20 73 68 6f 75 6c 64 20 70 72 6f 62 61 62 6c 79 20 6d 61 6b 65 20 74 68 61 74 20 odule.should.probably.make.that.
4940 61 76 61 69 6c 61 62 6c 65 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 74 68 72 6f 77 20 6e available................throw.n
4960 65 77 20 4e 6f 74 49 6d 70 6c 65 6d 65 6e 74 65 64 45 78 63 65 70 74 69 6f 6e 28 29 3b 0d 0a 20 ew.NotImplementedException();...
4980 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
49a0 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4a 6f 69 6e 20 61 20 6e 65 77 20 70 6c 61 79 65 72 >..........///.Join.a.new.player
49c0 20 62 61 73 65 64 20 6f 6e 20 69 6e 70 75 74 20 72 65 63 65 69 76 65 64 20 74 68 72 6f 75 67 68 .based.on.input.received.through
49e0 20 61 6e 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 41 63 74 69 6f 6e 22 2f 3e 2e 0d 0a .an.<see.cref="InputAction"/>...
4a00 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 75 6d 6d 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 ........///.</summary>..........
4a20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 63 6f 6e 74 65 78 74 22 3e 3c 2f 70 61 72 61 ///.<param.name="context"></para
4a40 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 72 65 6d 61 72 6b 73 3e 0d 0a 20 20 20 20 20 m>..........///.<remarks>.......
4a60 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 70 75 62 6c 69 ...///.</remarks>..........publi
4a80 63 20 76 6f 69 64 20 4a 6f 69 6e 50 6c 61 79 65 72 46 72 6f 6d 41 63 74 69 6f 6e 28 49 6e 70 75 c.void.JoinPlayerFromAction(Inpu
4aa0 74 41 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 tAction.CallbackContext.context)
4ac0 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 21 43 68 ..........{..............if.(!Ch
4ae0 65 63 6b 49 66 50 6c 61 79 65 72 43 61 6e 4a 6f 69 6e 28 29 29 0d 0a 20 20 20 20 20 20 20 20 20 eckIfPlayerCanJoin())...........
4b00 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 76 61 .......return;................va
4b20 72 20 64 65 76 69 63 65 20 3d 20 63 6f 6e 74 65 78 74 2e 63 6f 6e 74 72 6f 6c 2e 64 65 76 69 63 r.device.=.context.control.devic
4b40 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4a 6f 69 6e 50 6c 61 79 65 72 28 70 61 69 72 57 e;..............JoinPlayer(pairW
4b60 69 74 68 44 65 76 69 63 65 3a 20 64 65 76 69 63 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a ithDevice:.device);..........}..
4b80 0d 0a 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 76 6f 69 64 20 4a 6f 69 6e 50 6c 61 79 65 72 ..........public.void.JoinPlayer
4ba0 46 72 6f 6d 41 63 74 69 6f 6e 49 66 4e 6f 74 41 6c 72 65 61 64 79 4a 6f 69 6e 65 64 28 49 6e 70 FromActionIfNotAlreadyJoined(Inp
4bc0 75 74 41 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 utAction.CallbackContext.context
4be0 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 21 43 )..........{..............if.(!C
4c00 68 65 63 6b 49 66 50 6c 61 79 65 72 43 61 6e 4a 6f 69 6e 28 29 29 0d 0a 20 20 20 20 20 20 20 20 heckIfPlayerCanJoin())..........
4c20 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 76 ........return;................v
4c40 61 72 20 64 65 76 69 63 65 20 3d 20 63 6f 6e 74 65 78 74 2e 63 6f 6e 74 72 6f 6c 2e 64 65 76 69 ar.device.=.context.control.devi
4c60 63 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 50 6c 61 79 65 72 49 6e 70 75 74 ce;..............if.(PlayerInput
4c80 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 64 65 76 69 63 65 29 .FindFirstPairedToDevice(device)
4ca0 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 72 65 74 75 72 .!=.null)..................retur
4cc0 6e 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 4a 6f 69 6e 50 6c 61 79 65 72 28 70 61 69 n;................JoinPlayer(pai
4ce0 72 57 69 74 68 44 65 76 69 63 65 3a 20 64 65 76 69 63 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d rWithDevice:.device);..........}
4d00 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>.......
4d20 20 20 20 2f 2f 2f 20 53 70 61 77 6e 20 61 20 6e 65 77 20 70 6c 61 79 65 72 20 66 72 6f 6d 20 3c ...///.Spawn.a.new.player.from.<
4d40 73 65 65 20 63 72 65 66 3d 22 70 6c 61 79 65 72 50 72 65 66 61 62 22 2f 3e 2e 0d 0a 20 20 20 20 see.cref="playerPrefab"/>.......
4d60 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>..........///.
4d80 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 70 6c 61 79 65 72 49 6e 64 65 78 22 3e 4f 70 74 69 6f 6e <param.name="playerIndex">Option
4da0 61 6c 20 65 78 70 6c 69 63 69 74 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c 61 79 65 72 49 6e 70 al.explicit.<see.cref="PlayerInp
4dc0 75 74 2e 70 6c 61 79 65 72 49 6e 64 65 78 22 2f 3e 20 74 6f 20 61 73 73 69 67 6e 20 74 6f 20 74 ut.playerIndex"/>.to.assign.to.t
4de0 68 65 20 70 6c 61 79 65 72 2e 20 4d 75 73 74 20 62 65 20 75 6e 69 71 75 65 20 77 69 74 68 69 6e he.player..Must.be.unique.within
4e00 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 50 6c 61 79 65 72 49 ..........///.<see.cref="PlayerI
4e20 6e 70 75 74 2e 61 6c 6c 22 2f 3e 2e 20 49 66 20 6e 6f 74 20 73 75 70 70 6c 69 65 64 2c 20 61 20 nput.all"/>..If.not.supplied,.a.
4e40 70 6c 61 79 65 72 20 69 6e 64 65 78 20 77 69 6c 6c 20 62 65 20 61 73 73 69 67 6e 65 64 20 61 75 player.index.will.be.assigned.au
4e60 74 6f 6d 61 74 69 63 61 6c 6c 79 20 28 73 6d 61 6c 6c 65 73 74 20 75 6e 75 73 65 64 20 69 6e 64 tomatically.(smallest.unused.ind
4e80 65 78 20 77 69 6c 6c 20 62 65 20 75 73 65 64 29 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 ex.will.be.used).</param>.......
4ea0 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 49 ...///.<param.name="splitScreenI
4ec0 6e 64 65 78 22 3e 4f 70 74 69 6f 6e 61 6c 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c 61 79 65 72 ndex">Optional.<see.cref="Player
4ee0 49 6e 70 75 74 2e 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 22 2f 3e 2e 20 49 66 20 73 75 Input.splitScreenIndex"/>..If.su
4f00 70 70 6c 69 65 64 2c 20 74 68 69 73 20 61 73 73 69 67 6e 73 20 61 20 73 70 6c 69 74 2d 73 63 72 pplied,.this.assigns.a.split-scr
4f20 65 65 6e 20 61 72 65 61 20 74 6f 20 74 68 65 20 70 6c 61 79 65 72 2e 20 46 6f 72 20 65 78 61 6d een.area.to.the.player..For.exam
4f40 70 6c 65 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 20 73 70 6c 69 74 2d 73 63 72 65 65 6e ple,..........///.a.split-screen
4f60 20 69 6e 64 65 78 20 6f 66 20 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 .index.of.</param>..........///.
4f80 3c 70 61 72 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 <param.name="controlScheme">Cont
4fa0 72 6f 6c 20 73 63 68 65 6d 65 20 74 6f 20 61 63 74 69 76 61 74 65 20 6f 6e 20 74 68 65 20 70 6c rol.scheme.to.activate.on.the.pl
4fc0 61 79 65 72 20 28 6f 70 74 69 6f 6e 61 6c 29 2e 20 49 66 20 6e 6f 74 20 73 75 70 70 6c 69 65 64 ayer.(optional)..If.not.supplied
4fe0 2c 20 61 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 77 69 6c 6c 0d 0a 20 20 20 20 20 20 20 ,.a.control.scheme.will.........
5000 20 2f 2f 2f 20 62 65 20 73 65 6c 65 63 74 65 64 20 62 61 73 65 64 20 6f 6e 20 3c 70 61 72 61 6d .///.be.selected.based.on.<param
5020 72 65 66 20 6e 61 6d 65 3d 22 70 61 69 72 57 69 74 68 44 65 76 69 63 65 22 2f 3e 2e 20 49 66 20 ref.name="pairWithDevice"/>..If.
5040 6e 6f 20 64 65 76 69 63 65 20 69 73 20 67 69 76 65 6e 20 65 69 74 68 65 72 2c 20 74 68 65 20 66 no.device.is.given.either,.the.f
5060 69 72 73 74 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 74 68 61 74 20 6d 61 74 63 68 65 73 irst.control.scheme.that.matches
5080 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 65 20 63 75 72 72 65 6e 74 6c 79 20 61 76 61 69 ..........///.the.currently.avai
50a0 6c 61 62 6c 65 20 75 6e 70 61 69 72 65 64 20 64 65 76 69 63 65 73 20 28 73 65 65 20 3c 73 65 65 lable.unpaired.devices.(see.<see
50c0 20 63 72 65 66 3d 22 49 6e 70 75 74 55 73 65 72 2e 47 65 74 55 6e 70 61 69 72 65 64 49 6e 70 75 .cref="InputUser.GetUnpairedInpu
50e0 74 44 65 76 69 63 65 73 28 29 22 2f 3e 29 20 69 73 20 75 73 65 64 2e 3c 2f 70 61 72 61 6d 3e 0d tDevices()"/>).is.used.</param>.
5100 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 61 69 72 57 69 .........///.<param.name="pairWi
5120 74 68 44 65 76 69 63 65 22 3e 44 65 76 69 63 65 20 74 6f 20 70 61 69 72 20 74 6f 20 74 68 65 20 thDevice">Device.to.pair.to.the.
5140 70 6c 61 79 65 72 2e 20 41 6c 73 6f 20 64 65 74 65 72 6d 69 6e 65 73 20 77 68 69 63 68 20 63 6f player..Also.determines.which.co
5160 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 74 6f 20 75 73 65 20 69 66 20 3c 70 61 72 61 6d 72 65 66 ntrol.scheme.to.use.if.<paramref
5180 20 6e 61 6d 65 3d 22 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 22 2f 3e 0d 0a 20 20 20 20 20 20 20 .name="controlScheme"/>.........
51a0 20 2f 2f 2f 20 69 73 20 6e 6f 74 20 67 69 76 65 6e 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 .///.is.not.given.</param>......
51c0 20 20 20 20 2f 2f 2f 20 3c 72 65 74 75 72 6e 73 3e 54 68 65 20 6e 65 77 6c 79 20 69 6e 73 74 61 ....///.<returns>The.newly.insta
51e0 6e 74 69 61 74 65 64 20 70 6c 61 79 65 72 20 6f 72 20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 20 69 66 ntiated.player.or.<c>null</c>.if
5200 20 6a 6f 69 6e 69 6e 67 20 66 61 69 6c 65 64 2e 3c 2f 72 65 74 75 72 6e 73 3e 0d 0a 20 20 20 20 .joining.failed.</returns>......
5220 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 4a ....///.<remarks>..........///.J
5240 6f 69 6e 69 6e 67 20 6d 75 73 74 20 62 65 20 65 6e 61 62 6c 65 64 20 28 73 65 65 20 3c 73 65 65 oining.must.be.enabled.(see.<see
5260 20 63 72 65 66 3d 22 6a 6f 69 6e 69 6e 67 45 6e 61 62 6c 65 64 22 2f 3e 29 20 6f 72 20 74 68 65 .cref="joiningEnabled"/>).or.the
5280 20 6d 65 74 68 6f 64 20 77 69 6c 6c 20 66 61 69 6c 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 0d .method.will.fail...........///.
52a0 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 54 6f 20 70 61 69 72 20 6d 75 6c 74 69 70 6c 65 20 64 65 .........///.To.pair.multiple.de
52c0 76 69 63 65 73 2c 20 75 73 65 20 3c 73 65 65 20 63 72 65 66 3d 22 4a 6f 69 6e 50 6c 61 79 65 72 vices,.use.<see.cref="JoinPlayer
52e0 28 69 6e 74 2c 69 6e 74 2c 73 74 72 69 6e 67 2c 49 6e 70 75 74 44 65 76 69 63 65 5b 5d 29 22 2f (int,int,string,InputDevice[])"/
5300 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>......
5320 20 20 20 20 70 75 62 6c 69 63 20 50 6c 61 79 65 72 49 6e 70 75 74 20 4a 6f 69 6e 50 6c 61 79 65 ....public.PlayerInput.JoinPlaye
5340 72 28 69 6e 74 20 70 6c 61 79 65 72 49 6e 64 65 78 20 3d 20 2d 31 2c 20 69 6e 74 20 73 70 6c 69 r(int.playerIndex.=.-1,.int.spli
5360 74 53 63 72 65 65 6e 49 6e 64 65 78 20 3d 20 2d 31 2c 20 73 74 72 69 6e 67 20 63 6f 6e 74 72 6f tScreenIndex.=.-1,.string.contro
5380 6c 53 63 68 65 6d 65 20 3d 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 44 65 76 69 63 65 20 70 61 69 72 lScheme.=.null,.InputDevice.pair
53a0 57 69 74 68 44 65 76 69 63 65 20 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 WithDevice.=.null)..........{...
53c0 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 43 68 65 63 6b 49 66 50 6c 61 79 65 72 43 61 6e ...........if.(!CheckIfPlayerCan
53e0 4a 6f 69 6e 28 70 6c 61 79 65 72 49 6e 64 65 78 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 Join(playerIndex))..............
5400 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 20 20 20 20 20 20 ....return.null;................
5420 50 6c 61 79 65 72 49 6e 70 75 74 2e 73 5f 44 65 73 74 72 6f 79 49 66 44 65 76 69 63 65 53 65 74 PlayerInput.s_DestroyIfDeviceSet
5440 75 70 55 6e 73 75 63 63 65 73 73 66 75 6c 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 upUnsuccessful.=.true;..........
5460 20 20 20 20 72 65 74 75 72 6e 20 50 6c 61 79 65 72 49 6e 70 75 74 2e 49 6e 73 74 61 6e 74 69 61 ....return.PlayerInput.Instantia
5480 74 65 28 6d 5f 50 6c 61 79 65 72 50 72 65 66 61 62 2c 20 70 6c 61 79 65 72 49 6e 64 65 78 3a 20 te(m_PlayerPrefab,.playerIndex:.
54a0 70 6c 61 79 65 72 49 6e 64 65 78 2c 20 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 3a 20 73 playerIndex,.splitScreenIndex:.s
54c0 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 plitScreenIndex,................
54e0 20 20 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 3a 20 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 2c 20 ..controlScheme:.controlScheme,.
5500 70 61 69 72 57 69 74 68 44 65 76 69 63 65 3a 20 70 61 69 72 57 69 74 68 44 65 76 69 63 65 29 3b pairWithDevice:.pairWithDevice);
5520 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
5540 61 72 79 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 53 70 61 77 6e 20 61 20 6e 65 77 20 70 6c ary>..........///.Spawn.a.new.pl
5560 61 79 65 72 20 66 72 6f 6d 20 3c 73 65 65 20 63 72 65 66 3d 22 70 6c 61 79 65 72 50 72 65 66 61 ayer.from.<see.cref="playerPrefa
5580 62 22 2f 3e 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 b"/>...........///.</summary>...
55a0 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 72 49 6e .......///.<param.name="playerIn
55c0 64 65 78 22 3e 4f 70 74 69 6f 6e 61 6c 20 65 78 70 6c 69 63 69 74 20 3c 73 65 65 20 63 72 65 66 dex">Optional.explicit.<see.cref
55e0 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 2f 3e 20 74 6f 20 ="PlayerInput.playerIndex"/>.to.
5600 61 73 73 69 67 6e 20 74 6f 20 74 68 65 20 70 6c 61 79 65 72 2e 20 4d 75 73 74 20 62 65 20 75 6e assign.to.the.player..Must.be.un
5620 69 71 75 65 20 77 69 74 68 69 6e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 73 65 65 20 63 72 ique.within..........///.<see.cr
5640 65 66 3d 22 50 6c 61 79 65 72 49 6e 70 75 74 2e 61 6c 6c 22 2f 3e 2e 20 49 66 20 6e 6f 74 20 73 ef="PlayerInput.all"/>..If.not.s
5660 75 70 70 6c 69 65 64 2c 20 61 20 70 6c 61 79 65 72 20 69 6e 64 65 78 20 77 69 6c 6c 20 62 65 20 upplied,.a.player.index.will.be.
5680 61 73 73 69 67 6e 65 64 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 28 73 6d 61 6c 6c 65 73 74 assigned.automatically.(smallest
56a0 20 75 6e 75 73 65 64 20 69 6e 64 65 78 20 77 69 6c 6c 20 62 65 20 75 73 65 64 29 2e 3c 2f 70 61 .unused.index.will.be.used).</pa
56c0 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 73 ram>..........///.<param.name="s
56e0 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 22 3e 4f 70 74 69 6f 6e 61 6c 20 3c 73 65 65 20 63 plitScreenIndex">Optional.<see.c
5700 72 65 66 3d 22 50 6c 61 79 65 72 49 6e 70 75 74 2e 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 ref="PlayerInput.splitScreenInde
5720 78 22 2f 3e 2e 20 49 66 20 73 75 70 70 6c 69 65 64 2c 20 74 68 69 73 20 61 73 73 69 67 6e 73 20 x"/>..If.supplied,.this.assigns.
5740 61 20 73 70 6c 69 74 2d 73 63 72 65 65 6e 20 61 72 65 61 20 74 6f 20 74 68 65 20 70 6c 61 79 65 a.split-screen.area.to.the.playe
5760 72 2e 20 46 6f 72 20 65 78 61 6d 70 6c 65 2c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 61 20 73 r..For.example,..........///.a.s
5780 70 6c 69 74 2d 73 63 72 65 65 6e 20 69 6e 64 65 78 20 6f 66 20 3c 2f 70 61 72 61 6d 3e 0d 0a 20 plit-screen.index.of.</param>...
57a0 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 6f 6c 53 .......///.<param.name="controlS
57c0 63 68 65 6d 65 22 3e 43 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 74 6f 20 61 63 74 69 76 61 74 cheme">Control.scheme.to.activat
57e0 65 20 6f 6e 20 74 68 65 20 70 6c 61 79 65 72 20 28 6f 70 74 69 6f 6e 61 6c 29 2e 20 49 66 20 6e e.on.the.player.(optional)..If.n
5800 6f 74 20 73 75 70 70 6c 69 65 64 2c 20 61 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 77 69 ot.supplied,.a.control.scheme.wi
5820 6c 6c 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 62 65 20 73 65 6c 65 63 74 65 64 20 62 61 73 65 ll..........///.be.selected.base
5840 64 20 6f 6e 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 70 61 69 72 57 69 74 68 44 65 76 d.on.<paramref.name="pairWithDev
5860 69 63 65 73 22 2f 3e 2e 20 49 66 20 6e 6f 20 64 65 76 69 63 65 20 69 73 20 67 69 76 65 6e 20 65 ices"/>..If.no.device.is.given.e
5880 69 74 68 65 72 2c 20 74 68 65 20 66 69 72 73 74 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 ither,.the.first.control.scheme.
58a0 74 68 61 74 20 6d 61 74 63 68 65 73 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 68 65 20 63 75 that.matches..........///.the.cu
58c0 72 72 65 6e 74 6c 79 20 61 76 61 69 6c 61 62 6c 65 20 75 6e 70 61 69 72 65 64 20 64 65 76 69 63 rrently.available.unpaired.devic
58e0 65 73 20 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 49 6e 70 75 74 55 73 65 72 2e 47 65 74 es.(see.<see.cref="InputUser.Get
5900 55 6e 70 61 69 72 65 64 49 6e 70 75 74 44 65 76 69 63 65 73 28 29 22 2f 3e 29 20 69 73 20 75 73 UnpairedInputDevices()"/>).is.us
5920 65 64 2e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 70 61 72 61 6d 20 ed.</param>..........///.<param.
5940 6e 61 6d 65 3d 22 70 61 69 72 57 69 74 68 44 65 76 69 63 65 73 22 3e 44 65 76 69 63 65 73 20 74 name="pairWithDevices">Devices.t
5960 6f 20 70 61 69 72 20 74 6f 20 74 68 65 20 70 6c 61 79 65 72 2e 20 41 6c 73 6f 20 64 65 74 65 72 o.pair.to.the.player..Also.deter
5980 6d 69 6e 65 73 20 77 68 69 63 68 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 20 74 6f 20 75 73 mines.which.control.scheme.to.us
59a0 65 20 69 66 20 3c 70 61 72 61 6d 72 65 66 20 6e 61 6d 65 3d 22 63 6f 6e 74 72 6f 6c 53 63 68 65 e.if.<paramref.name="controlSche
59c0 6d 65 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 69 73 20 6e 6f 74 20 67 69 76 65 6e 2e me"/>..........///.is.not.given.
59e0 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 75 72 6e 73 3e 54 </param>..........///.<returns>T
5a00 68 65 20 6e 65 77 6c 79 20 69 6e 73 74 61 6e 74 69 61 74 65 64 20 70 6c 61 79 65 72 20 6f 72 20 he.newly.instantiated.player.or.
5a20 3c 63 3e 6e 75 6c 6c 3c 2f 63 3e 20 69 66 20 6a 6f 69 6e 69 6e 67 20 66 61 69 6c 65 64 2e 3c 2f <c>null</c>.if.joining.failed.</
5a40 72 65 74 75 72 6e 73 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 returns>..........///.<remarks>.
5a60 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 4a 6f 69 6e 69 6e 67 20 6d 75 73 74 20 62 65 20 65 6e 61 .........///.Joining.must.be.ena
5a80 62 6c 65 64 20 28 73 65 65 20 3c 73 65 65 20 63 72 65 66 3d 22 6a 6f 69 6e 69 6e 67 45 6e 61 62 bled.(see.<see.cref="joiningEnab
5aa0 6c 65 64 22 2f 3e 29 20 6f 72 20 74 68 65 20 6d 65 74 68 6f 64 20 77 69 6c 6c 20 66 61 69 6c 2e led"/>).or.the.method.will.fail.
5ac0 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>........
5ae0 20 20 70 75 62 6c 69 63 20 50 6c 61 79 65 72 49 6e 70 75 74 20 4a 6f 69 6e 50 6c 61 79 65 72 28 ..public.PlayerInput.JoinPlayer(
5b00 69 6e 74 20 70 6c 61 79 65 72 49 6e 64 65 78 20 3d 20 2d 31 2c 20 69 6e 74 20 73 70 6c 69 74 53 int.playerIndex.=.-1,.int.splitS
5b20 63 72 65 65 6e 49 6e 64 65 78 20 3d 20 2d 31 2c 20 73 74 72 69 6e 67 20 63 6f 6e 74 72 6f 6c 53 creenIndex.=.-1,.string.controlS
5b40 63 68 65 6d 65 20 3d 20 6e 75 6c 6c 2c 20 70 61 72 61 6d 73 20 49 6e 70 75 74 44 65 76 69 63 65 cheme.=.null,.params.InputDevice
5b60 5b 5d 20 70 61 69 72 57 69 74 68 44 65 76 69 63 65 73 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a [].pairWithDevices)..........{..
5b80 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 43 68 65 63 6b 49 66 50 6c 61 79 65 72 43 61 ............if.(!CheckIfPlayerCa
5ba0 6e 4a 6f 69 6e 28 70 6c 61 79 65 72 49 6e 64 65 78 29 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 nJoin(playerIndex)).............
5bc0 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 20 20 20 20 20 .....return.null;...............
5be0 20 50 6c 61 79 65 72 49 6e 70 75 74 2e 73 5f 44 65 73 74 72 6f 79 49 66 44 65 76 69 63 65 53 65 .PlayerInput.s_DestroyIfDeviceSe
5c00 74 75 70 55 6e 73 75 63 63 65 73 73 66 75 6c 20 3d 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 tupUnsuccessful.=.true;.........
5c20 20 20 20 20 20 72 65 74 75 72 6e 20 50 6c 61 79 65 72 49 6e 70 75 74 2e 49 6e 73 74 61 6e 74 69 .....return.PlayerInput.Instanti
5c40 61 74 65 28 6d 5f 50 6c 61 79 65 72 50 72 65 66 61 62 2c 20 70 6c 61 79 65 72 49 6e 64 65 78 3a ate(m_PlayerPrefab,.playerIndex:
5c60 20 70 6c 61 79 65 72 49 6e 64 65 78 2c 20 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 3a 20 .playerIndex,.splitScreenIndex:.
5c80 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 splitScreenIndex,...............
5ca0 20 20 20 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 3a 20 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 2c ...controlScheme:.controlScheme,
5cc0 20 70 61 69 72 57 69 74 68 44 65 76 69 63 65 73 3a 20 70 61 69 72 57 69 74 68 44 65 76 69 63 65 .pairWithDevices:.pairWithDevice
5ce0 73 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 5b 53 65 72 69 61 s);..........}............[Seria
5d00 6c 69 7a 65 46 69 65 6c 64 5d 20 69 6e 74 65 72 6e 61 6c 20 50 6c 61 79 65 72 4e 6f 74 69 66 69 lizeField].internal.PlayerNotifi
5d20 63 61 74 69 6f 6e 73 20 6d 5f 4e 6f 74 69 66 69 63 61 74 69 6f 6e 42 65 68 61 76 69 6f 72 3b 0d cations.m_NotificationBehavior;.
5d40 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 65 72 6e .........[SerializeField].intern
5d60 61 6c 20 69 6e 74 20 6d 5f 4d 61 78 50 6c 61 79 65 72 43 6f 75 6e 74 20 3d 20 2d 31 3b 0d 0a 20 al.int.m_MaxPlayerCount.=.-1;...
5d80 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 65 72 6e 61 6c .......[SerializeField].internal
5da0 20 62 6f 6f 6c 20 6d 5f 41 6c 6c 6f 77 4a 6f 69 6e 69 6e 67 20 3d 20 74 72 75 65 3b 0d 0a 20 20 .bool.m_AllowJoining.=.true;....
5dc0 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 65 72 6e 61 6c 20 ......[SerializeField].internal.
5de0 50 6c 61 79 65 72 4a 6f 69 6e 42 65 68 61 76 69 6f 72 20 6d 5f 4a 6f 69 6e 42 65 68 61 76 69 6f PlayerJoinBehavior.m_JoinBehavio
5e00 72 3b 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 r;..........[SerializeField].int
5e20 65 72 6e 61 6c 20 50 6c 61 79 65 72 4a 6f 69 6e 65 64 45 76 65 6e 74 20 6d 5f 50 6c 61 79 65 72 ernal.PlayerJoinedEvent.m_Player
5e40 4a 6f 69 6e 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 JoinedEvent;..........[Serialize
5e60 46 69 65 6c 64 5d 20 69 6e 74 65 72 6e 61 6c 20 50 6c 61 79 65 72 4c 65 66 74 45 76 65 6e 74 20 Field].internal.PlayerLeftEvent.
5e80 6d 5f 50 6c 61 79 65 72 4c 65 66 74 45 76 65 6e 74 3b 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 m_PlayerLeftEvent;..........[Ser
5ea0 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 41 63 74 69 6f ializeField].internal.InputActio
5ec0 6e 50 72 6f 70 65 72 74 79 20 6d 5f 4a 6f 69 6e 41 63 74 69 6f 6e 3b 0d 0a 20 20 20 20 20 20 20 nProperty.m_JoinAction;.........
5ee0 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 47 61 6d 65 4f .[SerializeField].internal.GameO
5f00 62 6a 65 63 74 20 6d 5f 50 6c 61 79 65 72 50 72 65 66 61 62 3b 0d 0a 20 20 20 20 20 20 20 20 5b bject.m_PlayerPrefab;..........[
5f20 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 62 6f 6f 6c 20 6d 5f SerializeField].internal.bool.m_
5f40 53 70 6c 69 74 53 63 72 65 65 6e 3b 0d 0a 20 20 20 20 20 20 20 20 5b 53 65 72 69 61 6c 69 7a 65 SplitScreen;..........[Serialize
5f60 46 69 65 6c 64 5d 20 69 6e 74 65 72 6e 61 6c 20 62 6f 6f 6c 20 6d 5f 4d 61 69 6e 74 61 69 6e 41 Field].internal.bool.m_MaintainA
5f80 73 70 65 63 74 52 61 74 69 6f 49 6e 53 70 6c 69 74 53 63 72 65 65 6e 3b 0d 0a 20 20 20 20 20 20 spectRatioInSplitScreen;........
5fa0 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 69 6e 74 20 ..[SerializeField].internal.int.
5fc0 6d 5f 46 69 78 65 64 4e 75 6d 62 65 72 4f 66 53 70 6c 69 74 53 63 72 65 65 6e 73 20 3d 20 2d 31 m_FixedNumberOfSplitScreens.=.-1
5fe0 3b 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 65 ;..........[SerializeField].inte
6000 72 6e 61 6c 20 52 65 63 74 20 6d 5f 53 70 6c 69 74 53 63 72 65 65 6e 52 65 63 74 20 3d 20 6e 65 rnal.Rect.m_SplitScreenRect.=.ne
6020 77 20 52 65 63 74 28 30 2c 20 30 2c 20 31 2c 20 31 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 5b w.Rect(0,.0,.1,.1);............[
6040 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 4a 6f NonSerialized].private.bool.m_Jo
6060 69 6e 41 63 74 69 6f 6e 44 65 6c 65 67 61 74 65 48 6f 6f 6b 65 64 3b 0d 0a 20 20 20 20 20 20 20 inActionDelegateHooked;.........
6080 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 6f 6c 20 6d 5f .[NonSerialized].private.bool.m_
60a0 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 48 6f 6f 6b 65 64 UnpairedDeviceUsedDelegateHooked
60c0 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 61 ;..........[NonSerialized].priva
60e0 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 6f te.Action<InputAction.CallbackCo
6100 6e 74 65 78 74 3e 20 6d 5f 4a 6f 69 6e 41 63 74 69 6f 6e 44 65 6c 65 67 61 74 65 3b 0d 0a 20 20 ntext>.m_JoinActionDelegate;....
6120 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 41 63 ......[NonSerialized].private.Ac
6140 74 69 6f 6e 3c 49 6e 70 75 74 43 6f 6e 74 72 6f 6c 2c 20 49 6e 70 75 74 45 76 65 6e 74 50 74 72 tion<InputControl,.InputEventPtr
6160 3e 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 3b 0d >.m_UnpairedDeviceUsedDelegate;.
6180 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 61 74 65 .........[NonSerialized].private
61a0 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 70 75 74 .InlinedArray<Action<PlayerInput
61c0 3e 3e 20 6d 5f 50 6c 61 79 65 72 4a 6f 69 6e 65 64 43 61 6c 6c 62 61 63 6b 73 3b 0d 0a 20 20 20 >>.m_PlayerJoinedCallbacks;.....
61e0 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 6c .....[NonSerialized].private.Inl
6200 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 6d inedArray<Action<PlayerInput>>.m
6220 5f 50 6c 61 79 65 72 4c 65 66 74 43 61 6c 6c 62 61 63 6b 73 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 _PlayerLeftCallbacks;...........
6240 20 69 6e 74 65 72 6e 61 6c 20 73 74 61 74 69 63 20 73 74 72 69 6e 67 5b 5d 20 6d 65 73 73 61 67 .internal.static.string[].messag
6260 65 73 20 3d 3e 20 6e 65 77 5b 5d 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 es.=>.new[]..........{..........
6280 20 20 20 20 50 6c 61 79 65 72 4a 6f 69 6e 65 64 4d 65 73 73 61 67 65 2c 0d 0a 20 20 20 20 20 20 ....PlayerJoinedMessage,........
62a0 20 20 20 20 20 20 50 6c 61 79 65 72 4c 65 66 74 4d 65 73 73 61 67 65 2c 0d 0a 20 20 20 20 20 20 ......PlayerLeftMessage,........
62c0 20 20 7d 3b 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 43 68 65 ..};............private.bool.Che
62e0 63 6b 49 66 50 6c 61 79 65 72 43 61 6e 4a 6f 69 6e 28 69 6e 74 20 70 6c 61 79 65 72 49 6e 64 65 ckIfPlayerCanJoin(int.playerInde
6300 78 20 3d 20 2d 31 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 x.=.-1)..........{..............
6320 69 66 20 28 6d 5f 50 6c 61 79 65 72 50 72 65 66 61 62 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 if.(m_PlayerPrefab.==.null).....
6340 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 44 65 62 75 .........{..................Debu
6360 67 2e 4c 6f 67 45 72 72 6f 72 28 22 70 6c 61 79 65 72 50 72 65 66 61 62 20 6d 75 73 74 20 62 65 g.LogError("playerPrefab.must.be
6380 20 73 65 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 6a 6f 69 6e .set.in.order.to.be.able.to.join
63a0 20 6e 65 77 20 70 6c 61 79 65 72 73 22 2c 20 74 68 69 73 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 .new.players",.this);...........
63c0 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 .......return.false;............
63e0 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 4d 61 78 50 6c 61 79 ..}................if.(m_MaxPlay
6400 65 72 43 6f 75 6e 74 20 3e 3d 20 30 20 26 26 20 70 6c 61 79 65 72 43 6f 75 6e 74 20 3e 3d 20 6d erCount.>=.0.&&.playerCount.>=.m
6420 5f 4d 61 78 50 6c 61 79 65 72 43 6f 75 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d _MaxPlayerCount)..............{.
6440 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 28 .................Debug.LogError(
6460 22 48 61 76 65 20 72 65 61 63 68 65 64 20 6d 61 78 69 6d 75 6d 20 70 6c 61 79 65 72 20 63 6f 75 "Have.reached.maximum.player.cou
6480 6e 74 20 6f 66 20 22 20 2b 20 6d 61 78 50 6c 61 79 65 72 43 6f 75 6e 74 2c 20 74 68 69 73 29 3b nt.of.".+.maxPlayerCount,.this);
64a0 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;.
64c0 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 .............}................//
64e0 20 49 66 20 77 65 20 68 61 76 65 20 61 20 70 6c 61 79 65 72 20 69 6e 64 65 78 2c 20 6d 61 6b 65 .If.we.have.a.player.index,.make
6500 20 73 75 72 65 20 69 74 27 73 20 75 6e 69 71 75 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 .sure.it's.unique...............
6520 69 66 20 28 70 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 if.(playerIndex.!=.-1)..........
6540 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 76 61 72 20 ....{..................for.(var.
6560 69 20 3d 20 30 3b 20 69 20 3c 20 50 6c 61 79 65 72 49 6e 70 75 74 2e 73 5f 41 6c 6c 41 63 74 69 i.=.0;.i.<.PlayerInput.s_AllActi
6580 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 20 20 20 20 vePlayersCount;.++i)............
65a0 20 20 20 20 20 20 20 20 20 20 69 66 20 28 50 6c 61 79 65 72 49 6e 70 75 74 2e 73 5f 41 6c 6c 41 ..........if.(PlayerInput.s_AllA
65c0 63 74 69 76 65 50 6c 61 79 65 72 73 5b 69 5d 2e 70 6c 61 79 65 72 49 6e 64 65 78 20 3d 3d 20 70 ctivePlayers[i].playerIndex.==.p
65e0 6c 61 79 65 72 49 6e 64 65 78 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 layerIndex).....................
6600 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 44 65 62 75 .{..........................Debu
6620 67 2e 4c 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 g.LogError(.....................
6640 20 20 20 20 20 20 20 20 20 24 22 50 6c 61 79 65 72 20 69 6e 64 65 78 20 23 7b 70 6c 61 79 65 72 .........$"Player.index.#{player
6660 49 6e 64 65 78 7d 20 69 73 20 61 6c 72 65 61 64 79 20 74 61 6b 65 6e 20 62 79 20 70 6c 61 79 65 Index}.is.already.taken.by.playe
6680 72 20 7b 50 6c 61 79 65 72 49 6e 70 75 74 2e 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 r.{PlayerInput.s_AllActivePlayer
66a0 73 5b 69 5d 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 20 20 20 s[i]}",.........................
66c0 20 20 20 20 20 50 6c 61 79 65 72 49 6e 70 75 74 2e 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 .....PlayerInput.s_AllActivePlay
66e0 65 72 73 5b 69 5d 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 ers[i]);........................
6700 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..return.false;.................
6720 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 .....}..............}...........
6740 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 20 7d 0d 0a 0d 0a .....return.true;..........}....
6760 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 64 44 ........private.void.OnUnpairedD
6780 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 2c 20 eviceUsed(InputControl.control,.
67a0 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 20 20 InputEventPtr.eventPtr).........
67c0 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f 41 6c 6c 6f 77 4a 6f 69 6e .{..............if.(!m_AllowJoin
67e0 69 6e 67 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 ing)..................return;...
6800 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 4a 6f 69 6e 42 65 68 61 76 69 6f 72 20 .............if.(m_JoinBehavior.
6820 3d 3d 20 50 6c 61 79 65 72 4a 6f 69 6e 42 65 68 61 76 69 6f 72 2e 4a 6f 69 6e 50 6c 61 79 65 72 ==.PlayerJoinBehavior.JoinPlayer
6840 73 57 68 65 6e 42 75 74 74 6f 6e 49 73 50 72 65 73 73 65 64 29 0d 0a 20 20 20 20 20 20 20 20 20 sWhenButtonIsPressed)...........
6860 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 4d 61 6b 65 20 73 75 ...{..................//.Make.su
6880 72 65 20 69 74 27 73 20 61 20 62 75 74 74 6f 6e 20 74 68 61 74 20 77 61 73 20 61 63 74 75 61 74 re.it's.a.button.that.was.actuat
68a0 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 21 28 63 6f 6e 74 72 ed...................if.(!(contr
68c0 6f 6c 20 69 73 20 42 75 74 74 6f 6e 43 6f 6e 74 72 6f 6c 29 29 0d 0a 20 20 20 20 20 20 20 20 20 ol.is.ButtonControl))...........
68e0 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 20 20 20 ...........return;..............
6900 20 20 20 20 20 20 2f 2f 20 4d 61 6b 65 20 73 75 72 65 20 69 74 27 73 20 61 20 64 65 76 69 63 65 ......//.Make.sure.it's.a.device
6920 20 74 68 61 74 20 69 73 20 75 73 61 62 6c 65 20 62 79 20 74 68 65 20 70 6c 61 79 65 72 27 73 20 .that.is.usable.by.the.player's.
6940 61 63 74 69 6f 6e 73 2e 20 57 65 20 64 6f 6e 27 74 20 77 61 6e 74 0d 0a 20 20 20 20 20 20 20 20 actions..We.don't.want..........
6960 20 20 20 20 20 20 20 20 2f 2f 20 74 6f 20 6a 6f 69 6e 20 61 20 70 6c 61 79 65 72 20 77 68 6f 27 ........//.to.join.a.player.who'
6980 73 20 74 68 65 6e 20 73 74 72 61 6e 64 65 64 20 61 6e 64 20 68 61 73 20 6e 6f 20 77 61 79 20 74 s.then.stranded.and.has.no.way.t
69a0 6f 20 61 63 74 75 61 6c 6c 79 20 69 6e 74 65 72 61 63 74 20 77 69 74 68 20 74 68 65 20 67 61 6d o.actually.interact.with.the.gam
69c0 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 49 73 44 65 76 69 63 e...................if.(!IsDevic
69e0 65 55 73 61 62 6c 65 57 69 74 68 50 6c 61 79 65 72 41 63 74 69 6f 6e 73 28 63 6f 6e 74 72 6f 6c eUsableWithPlayerActions(control
6a00 2e 64 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 72 .device))......................r
6a20 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 2f 2f 2f 2f 52 45 eturn;....................////RE
6a40 56 49 45 57 3a 20 73 68 6f 75 6c 64 20 77 65 20 6c 6f 67 20 61 20 77 61 72 6e 69 6e 67 20 6f 72 VIEW:.should.we.log.a.warning.or
6a60 20 65 72 72 6f 72 20 77 68 65 6e 20 74 68 65 20 61 63 74 69 6f 6e 73 20 66 6f 72 20 74 68 65 20 .error.when.the.actions.for.the.
6a80 70 6c 61 79 65 72 20 64 6f 20 6e 6f 74 20 68 61 76 65 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d player.do.not.have.control.schem
6aa0 65 73 3f 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4a 6f 69 6e 50 6c 61 79 65 es?....................JoinPlaye
6ac0 72 28 70 61 69 72 57 69 74 68 44 65 76 69 63 65 3a 20 63 6f 6e 74 72 6f 6c 2e 64 65 76 69 63 65 r(pairWithDevice:.control.device
6ae0 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 0d 0a );..............}..........}....
6b00 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 62 6c 65 28 29 0d ........private.void.OnEnable().
6b20 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 69 6e 73 74 .........{..............if.(inst
6b40 61 6e 63 65 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 ance.==.null)..............{....
6b60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 73 74 61 6e 63 65 20 3d 20 74 68 69 73 3b 0d 0a ..............instance.=.this;..
6b80 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0d ............}..............else.
6ba0 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 .............{..................
6bc0 44 65 62 75 67 2e 4c 6f 67 57 61 72 6e 69 6e 67 28 22 4d 75 6c 74 69 70 6c 65 20 50 6c 61 79 65 Debug.LogWarning("Multiple.Playe
6be0 72 49 6e 70 75 74 4d 61 6e 61 67 65 72 73 20 69 6e 20 74 68 65 20 67 61 6d 65 2e 20 54 68 65 72 rInputManagers.in.the.game..Ther
6c00 65 20 73 68 6f 75 6c 64 20 6f 6e 6c 79 20 62 65 20 6f 6e 65 20 50 6c 61 79 65 72 49 6e 70 75 74 e.should.only.be.one.PlayerInput
6c20 4d 61 6e 61 67 65 72 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 Manager",.this);................
6c40 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 ..return;..............}........
6c60 20 20 20 20 20 20 20 20 2f 2f 20 4a 6f 69 6e 20 61 6c 6c 20 70 6c 61 79 65 72 73 20 61 6c 72 65 ........//.Join.all.players.alre
6c80 61 64 79 20 69 6e 20 74 68 65 20 67 61 6d 65 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f ady.in.the.game...............fo
6ca0 72 20 28 76 61 72 20 69 20 3d 20 30 3b 20 69 20 3c 20 50 6c 61 79 65 72 49 6e 70 75 74 2e 73 5f r.(var.i.=.0;.i.<.PlayerInput.s_
6cc0 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).....
6ce0 20 20 20 20 20 20 20 20 20 20 20 20 20 4e 6f 74 69 66 79 50 6c 61 79 65 72 4a 6f 69 6e 65 64 28 .............NotifyPlayerJoined(
6d00 50 6c 61 79 65 72 49 6e 70 75 74 2e 73 5f 41 6c 6c 41 63 74 69 76 65 50 6c 61 79 65 72 73 5b 69 PlayerInput.s_AllActivePlayers[i
6d20 5d 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 6c 6c 6f 77 4a 6f ]);................if.(m_AllowJo
6d40 69 6e 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 45 6e 61 62 6c 65 4a 6f ining)..................EnableJo
6d60 69 6e 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 20 20 20 20 70 ining();..........}............p
6d80 72 69 76 61 74 65 20 76 6f 69 64 20 4f 6e 44 69 73 61 62 6c 65 28 29 0d 0a 20 20 20 20 20 20 20 rivate.void.OnDisable().........
6da0 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 6e 73 74 61 6e 63 65 20 3d 3d 20 .{..............if.(instance.==.
6dc0 74 68 69 73 29 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 this)..................instance.
6de0 3d 20 6e 75 6c 6c 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 41 6c 6c =.null;................if.(m_All
6e00 6f 77 4a 6f 69 6e 69 6e 67 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 44 69 73 61 owJoining)..................Disa
6e20 62 6c 65 4a 6f 69 6e 69 6e 67 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 bleJoining();..........}........
6e40 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 49 ....///.<summary>..........///.I
6e60 66 20 73 70 6c 69 74 2d 73 63 72 65 65 6e 20 69 73 20 65 6e 61 62 6c 65 64 2c 20 74 68 65 6e 20 f.split-screen.is.enabled,.then.
6e80 66 6f 72 20 65 61 63 68 20 70 6c 61 79 65 72 20 69 6e 20 74 68 65 20 67 61 6d 65 2c 20 61 64 6a for.each.player.in.the.game,.adj
6ea0 75 73 74 20 74 68 65 20 70 6c 61 79 65 72 27 73 20 3c 73 65 65 20 63 72 65 66 3d 22 43 61 6d 65 ust.the.player's.<see.cref="Came
6ec0 72 61 2e 72 65 63 74 22 2f 3e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 74 6f 20 66 69 74 20 74 ra.rect"/>..........///.to.fit.t
6ee0 68 65 20 70 6c 61 79 65 72 27 73 20 73 70 6c 69 74 20 73 63 72 65 65 6e 20 61 72 65 61 20 61 63 he.player's.split.screen.area.ac
6f00 63 6f 72 64 69 6e 67 20 74 6f 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 70 6c 61 79 65 72 73 cording.to.the.number.of.players
6f20 20 63 75 72 72 65 6e 74 6c 79 20 69 6e 20 74 68 65 20 67 61 6d 65 20 61 6e 64 20 74 68 65 0d 0a .currently.in.the.game.and.the..
6f40 20 20 20 20 20 20 20 20 2f 2f 2f 20 63 75 72 72 65 6e 74 20 73 70 6c 69 74 2d 73 63 72 65 65 6e ........///.current.split-screen
6f60 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f 20 3c 2f 73 .configuration...........///.</s
6f80 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 20 55 70 ummary>..........private.void.Up
6fa0 64 61 74 65 53 70 6c 69 74 53 63 72 65 65 6e 28 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 dateSplitScreen()..........{....
6fc0 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4e 6f 74 68 69 6e 67 20 74 6f 20 64 6f 20 69 66 20 73 70 ..........//.Nothing.to.do.if.sp
6fe0 6c 69 74 2d 73 63 72 65 65 6e 20 69 73 20 6e 6f 74 20 65 6e 61 62 6c 65 64 2e 0d 0a 20 20 20 20 lit-screen.is.not.enabled.......
7000 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f 53 70 6c 69 74 53 63 72 65 65 6e 29 0d 0a 20 20 20 ........if.(!m_SplitScreen).....
7020 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 20 .............return;............
7040 20 20 20 20 2f 2f 20 44 65 74 65 72 6d 69 6e 65 20 6e 75 6d 62 65 72 20 6f 66 20 73 70 6c 69 74 ....//.Determine.number.of.split
7060 2d 73 63 72 65 65 6e 73 20 74 6f 20 63 72 65 61 74 65 20 62 61 73 65 64 20 6f 6e 20 68 69 67 68 -screens.to.create.based.on.high
7080 65 73 74 20 70 6c 61 79 65 72 20 69 6e 64 65 78 20 77 65 20 68 61 76 65 2e 0d 0a 20 20 20 20 20 est.player.index.we.have........
70a0 20 20 20 20 20 20 20 76 61 72 20 6d 69 6e 53 70 6c 69 74 53 63 72 65 65 6e 43 6f 75 6e 74 20 3d .......var.minSplitScreenCount.=
70c0 20 30 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 61 72 20 70 6c .0;..............foreach.(var.pl
70e0 61 79 65 72 20 69 6e 20 50 6c 61 79 65 72 49 6e 70 75 74 2e 61 6c 6c 29 0d 0a 20 20 20 20 20 20 ayer.in.PlayerInput.all)........
7100 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 70 6c 61 ......{..................if.(pla
7120 79 65 72 2e 70 6c 61 79 65 72 49 6e 64 65 78 20 3e 3d 20 6d 69 6e 53 70 6c 69 74 53 63 72 65 65 yer.playerIndex.>=.minSplitScree
7140 6e 43 6f 75 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 69 6e nCount)......................min
7160 53 70 6c 69 74 53 63 72 65 65 6e 43 6f 75 6e 74 20 3d 20 70 6c 61 79 65 72 2e 70 6c 61 79 65 72 SplitScreenCount.=.player.player
7180 49 6e 64 65 78 20 2b 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 Index.+.1;..............}.......
71a0 20 20 20 20 20 20 20 20 20 2f 2f 20 41 64 6a 75 73 74 20 74 6f 20 66 69 78 65 64 20 6e 75 6d 62 .........//.Adjust.to.fixed.numb
71c0 65 72 20 69 66 20 77 65 20 68 61 76 65 20 69 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 er.if.we.have.it...............i
71e0 66 20 28 6d 5f 46 69 78 65 64 4e 75 6d 62 65 72 4f 66 53 70 6c 69 74 53 63 72 65 65 6e 73 20 3e f.(m_FixedNumberOfSplitScreens.>
7200 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 20 20 20 20 20 20 .0)..............{..............
7220 20 20 20 20 69 66 20 28 6d 5f 46 69 78 65 64 4e 75 6d 62 65 72 4f 66 53 70 6c 69 74 53 63 72 65 ....if.(m_FixedNumberOfSplitScre
7240 65 6e 73 20 3c 20 6d 69 6e 53 70 6c 69 74 53 63 72 65 65 6e 43 6f 75 6e 74 29 0d 0a 20 20 20 20 ens.<.minSplitScreenCount)......
7260 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 57 61 72 6e 69 6e 67 ................Debug.LogWarning
7280 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 24 22 48 69 67 (..........................$"Hig
72a0 68 65 73 74 20 70 6c 61 79 65 72 49 6e 64 65 78 20 6f 66 20 7b 6d 69 6e 53 70 6c 69 74 53 63 72 hest.playerIndex.of.{minSplitScr
72c0 65 65 6e 43 6f 75 6e 74 7d 20 65 78 63 65 65 64 73 20 66 69 78 65 64 20 6e 75 6d 62 65 72 20 6f eenCount}.exceeds.fixed.number.o
72e0 66 20 73 70 6c 69 74 2d 73 63 72 65 65 6e 73 20 6f 66 20 7b 6d 5f 46 69 78 65 64 4e 75 6d 62 65 f.split-screens.of.{m_FixedNumbe
7300 72 4f 66 53 70 6c 69 74 53 63 72 65 65 6e 73 7d 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 rOfSplitScreens}",..............
7320 20 20 20 20 20 20 20 20 20 20 20 20 74 68 69 73 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 ............this);..............
7340 20 20 20 20 20 20 6d 69 6e 53 70 6c 69 74 53 63 72 65 65 6e 43 6f 75 6e 74 20 3d 20 6d 5f 46 69 ......minSplitScreenCount.=.m_Fi
7360 78 65 64 4e 75 6d 62 65 72 4f 66 53 70 6c 69 74 53 63 72 65 65 6e 73 3b 0d 0a 20 20 20 20 20 20 xedNumberOfSplitScreens;........
7380 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 44 65 74 65 72 6d ......}................//.Determ
73a0 69 6e 65 20 64 69 76 69 73 69 6f 6e 73 20 61 6c 6f 6e 67 20 58 20 61 6e 64 20 59 2e 20 55 73 75 ine.divisions.along.X.and.Y..Usu
73c0 61 6c 6c 79 2c 20 77 65 20 68 61 76 65 20 61 20 73 71 75 61 72 65 20 67 72 69 64 20 6f 66 20 73 ally,.we.have.a.square.grid.of.s
73e0 70 6c 69 74 2d 73 63 72 65 65 6e 73 20 73 6f 20 61 6c 6c 20 77 65 20 6e 65 65 64 20 74 6f 0d 0a plit-screens.so.all.we.need.to..
7400 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 64 6f 20 69 73 20 6d 61 6b 65 20 69 74 20 6c 61 72 ............//.do.is.make.it.lar
7420 67 65 20 65 6e 6f 75 67 68 20 74 6f 20 66 69 74 20 61 6c 6c 20 70 6c 61 79 65 72 73 2e 0d 0a 20 ge.enough.to.fit.all.players....
7440 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 6e 75 6d 44 69 76 69 73 69 6f 6e 73 58 20 3d 20 4d ...........var.numDivisionsX.=.M
7460 61 74 68 66 2e 43 65 69 6c 54 6f 49 6e 74 28 4d 61 74 68 66 2e 53 71 72 74 28 6d 69 6e 53 70 6c athf.CeilToInt(Mathf.Sqrt(minSpl
7480 69 74 53 63 72 65 65 6e 43 6f 75 6e 74 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 itScreenCount));..............va
74a0 72 20 6e 75 6d 44 69 76 69 73 69 6f 6e 73 59 20 3d 20 6e 75 6d 44 69 76 69 73 69 6f 6e 73 58 3b r.numDivisionsY.=.numDivisionsX;
74c0 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 6d 5f 4d 61 69 6e 74 61 69 6e 41 73 70 ..............if.(!m_MaintainAsp
74e0 65 63 74 52 61 74 69 6f 49 6e 53 70 6c 69 74 53 63 72 65 65 6e 20 26 26 20 6e 75 6d 44 69 76 69 ectRatioInSplitScreen.&&.numDivi
7500 73 69 6f 6e 73 58 20 2a 20 28 6e 75 6d 44 69 76 69 73 69 6f 6e 73 58 20 2d 20 31 29 20 3e 3d 20 sionsX.*.(numDivisionsX.-.1).>=.
7520 6d 69 6e 53 70 6c 69 74 53 63 72 65 65 6e 43 6f 75 6e 74 29 0d 0a 20 20 20 20 20 20 20 20 20 20 minSplitScreenCount)............
7540 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 57 65 27 72 65 20 61 6c ..{..................//.We're.al
7560 6c 6f 77 65 64 20 74 6f 20 70 72 6f 64 75 63 65 20 73 70 6c 69 74 2d 73 63 72 65 65 6e 73 20 77 lowed.to.produce.split-screens.w
7580 69 74 68 20 61 73 70 65 63 74 20 72 61 74 69 6f 73 20 64 69 66 66 65 72 65 6e 74 20 66 72 6f 6d ith.aspect.ratios.different.from
75a0 20 74 68 65 20 73 63 72 65 65 6e 20 6d 65 61 6e 69 6e 67 0d 0a 20 20 20 20 20 20 20 20 20 20 20 .the.screen.meaning.............
75c0 20 20 20 20 20 2f 2f 20 74 68 61 74 20 77 65 20 61 6c 77 61 79 73 20 61 64 64 20 6f 6e 65 20 6d .....//.that.we.always.add.one.m
75e0 6f 72 65 20 63 6f 6c 75 6d 6e 20 62 65 66 6f 72 65 20 66 69 6e 61 6c 6c 79 20 61 64 64 69 6e 67 ore.column.before.finally.adding
7600 20 61 6e 20 65 6e 74 69 72 65 6c 79 20 6e 65 77 20 72 6f 77 2e 0d 0a 20 20 20 20 20 20 20 20 20 .an.entirely.new.row............
7620 20 20 20 20 20 20 20 6e 75 6d 44 69 76 69 73 69 6f 6e 73 59 20 2d 3d 20 31 3b 0d 0a 20 20 20 20 .......numDivisionsY.-=.1;......
7640 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 41 73 73 69 ........}................//.Assi
7660 67 6e 20 73 70 6c 69 74 2d 73 63 72 65 65 6e 20 61 72 65 61 20 74 6f 20 65 61 63 68 20 70 6c 61 gn.split-screen.area.to.each.pla
7680 79 65 72 2e 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 70 yer...............foreach.(var.p
76a0 6c 61 79 65 72 20 69 6e 20 50 6c 61 79 65 72 49 6e 70 75 74 2e 61 6c 6c 29 0d 0a 20 20 20 20 20 layer.in.PlayerInput.all).......
76c0 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 4d 61 6b .......{..................//.Mak
76e0 65 20 73 75 72 65 20 74 68 65 20 70 6c 61 79 65 72 27 73 20 73 70 6c 69 74 53 63 72 65 65 6e 49 e.sure.the.player's.splitScreenI
7700 6e 64 65 78 20 69 73 6e 27 74 20 6f 75 74 20 6f 66 20 72 61 6e 67 65 2e 0d 0a 20 20 20 20 20 20 ndex.isn't.out.of.range.........
7720 20 20 20 20 20 20 20 20 20 20 76 61 72 20 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 20 3d ..........var.splitScreenIndex.=
7740 20 70 6c 61 79 65 72 2e 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 .player.splitScreenIndex;.......
7760 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 20 ...........if.(splitScreenIndex.
7780 3e 3d 20 6e 75 6d 44 69 76 69 73 69 6f 6e 73 58 20 2a 20 6e 75 6d 44 69 76 69 73 69 6f 6e 73 59 >=.numDivisionsX.*.numDivisionsY
77a0 29 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 )..................{............
77c0 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(.......
77e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 22 53 70 6c 69 74 2d 73 63 72 65 65 ...................$"Split-scree
7800 6e 20 69 6e 64 65 78 20 6f 66 20 7b 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 7d 20 6f 6e n.index.of.{splitScreenIndex}.on
7820 20 70 6c 61 79 65 72 20 69 73 20 6f 75 74 20 6f 66 20 72 61 6e 67 65 20 28 68 61 76 65 20 7b 6e .player.is.out.of.range.(have.{n
7840 75 6d 44 69 76 69 73 69 6f 6e 73 58 20 2a 20 6e 75 6d 44 69 76 69 73 69 6f 6e 73 59 7d 20 73 63 umDivisionsX.*.numDivisionsY}.sc
7860 72 65 65 6e 73 29 3b 20 72 65 73 65 74 74 69 6e 67 20 74 6f 20 70 6c 61 79 65 72 49 6e 64 65 78 reens);.resetting.to.playerIndex
7880 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 6c 61 79 ",..........................play
78a0 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 20 70 6c 61 79 65 72 er);......................player
78c0 2e 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 2e 70 6c 61 .m_SplitScreenIndex.=.player.pla
78e0 79 65 72 49 6e 64 65 78 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a yerIndex;..................}....
7900 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4d 61 6b 65 20 73 75 72 65 20 77 65 20 ................//.Make.sure.we.
7920 68 61 76 65 20 61 20 63 61 6d 65 72 61 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 have.a.camera...................
7940 76 61 72 20 63 61 6d 65 72 61 20 3d 20 70 6c 61 79 65 72 2e 63 61 6d 65 72 61 3b 0d 0a 20 20 20 var.camera.=.player.camera;.....
7960 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 61 6d 65 72 61 20 3d 3d 20 6e 75 6c 6c 29 .............if.(camera.==.null)
7980 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 ..................{.............
79a0 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 20 .........Debug.LogError(........
79c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 50 6c 61 79 65 72 20 68 61 73 20 6e 6f .................."Player.has.no
79e0 20 63 61 6d 65 72 61 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 74 68 20 69 74 2e 20 43 61 6e 6e .camera.associated.with.it..Cann
7a00 6f 74 20 73 65 74 20 75 70 20 73 70 6c 69 74 2d 73 63 72 65 65 6e 2e 20 50 6f 69 6e 74 20 50 6c ot.set.up.split-screen..Point.Pl
7a20 61 79 65 72 49 6e 70 75 74 2e 63 61 6d 65 72 61 20 74 6f 20 63 61 6d 65 72 61 20 66 6f 72 20 70 ayerInput.camera.to.camera.for.p
7a40 6c 61 79 65 72 2e 22 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 layer.",........................
7a60 20 20 70 6c 61 79 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 20 ..player);......................
7a80 63 6f 6e 74 69 6e 75 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 continue;..................}....
7aa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 41 73 73 69 67 6e 20 73 70 6c 69 74 2d ................//.Assign.split-
7ac0 73 63 72 65 65 6e 20 61 72 65 61 20 62 61 73 65 64 20 6f 6e 20 6d 5f 53 70 6c 69 74 53 63 72 65 screen.area.based.on.m_SplitScre
7ae0 65 6e 52 65 63 74 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 63 6f 6c enRect...................var.col
7b00 75 6d 6e 20 3d 20 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 20 25 20 6e 75 6d 44 69 76 69 umn.=.splitScreenIndex.%.numDivi
7b20 73 69 6f 6e 73 58 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 72 6f 77 sionsX;..................var.row
7b40 20 3d 20 73 70 6c 69 74 53 63 72 65 65 6e 49 6e 64 65 78 20 2f 20 6e 75 6d 44 69 76 69 73 69 6f .=.splitScreenIndex./.numDivisio
7b60 6e 73 58 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 20 72 65 63 74 20 3d nsX;..................var.rect.=
7b80 20 6e 65 77 20 52 65 63 74 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7b 0d 0a 20 20 .new.Rect..................{....
7ba0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 69 64 74 68 20 3d 20 6d 5f 53 70 6c 69 ..................width.=.m_Spli
7bc0 74 53 63 72 65 65 6e 52 65 63 74 2e 77 69 64 74 68 20 2f 20 6e 75 6d 44 69 76 69 73 69 6f 6e 73 tScreenRect.width./.numDivisions
7be0 58 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 68 65 69 67 68 74 20 3d X,......................height.=
7c00 20 6d 5f 53 70 6c 69 74 53 63 72 65 65 6e 52 65 63 74 2e 68 65 69 67 68 74 20 2f 20 6e 75 6d 44 .m_SplitScreenRect.height./.numD
7c20 69 76 69 73 69 6f 6e 73 59 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 3b 0d 0a 20 ivisionsY..................};...
7c40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 63 74 2e 78 20 3d 20 6d 5f 53 70 6c 69 74 53 ...............rect.x.=.m_SplitS
7c60 63 72 65 65 6e 52 65 63 74 2e 78 20 2b 20 63 6f 6c 75 6d 6e 20 2a 20 72 65 63 74 2e 77 69 64 74 creenRect.x.+.column.*.rect.widt
7c80 68 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 59 20 69 73 20 62 6f 74 74 h;..................//.Y.is.bott
7ca0 6f 6d 2d 74 6f 2d 74 6f 70 20 62 75 74 20 77 65 20 66 69 6c 6c 20 66 72 6f 6d 20 74 6f 70 20 64 om-to-top.but.we.fill.from.top.d
7cc0 6f 77 6e 2e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 63 74 2e 79 20 3d 20 6d own...................rect.y.=.m
7ce0 5f 53 70 6c 69 74 53 63 72 65 65 6e 52 65 63 74 2e 79 20 2b 20 6d 5f 53 70 6c 69 74 53 63 72 65 _SplitScreenRect.y.+.m_SplitScre
7d00 65 6e 52 65 63 74 2e 68 65 69 67 68 74 20 2d 20 28 72 6f 77 20 2b 20 31 29 20 2a 20 72 65 63 74 enRect.height.-.(row.+.1).*.rect
7d20 2e 68 65 69 67 68 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 6d 65 72 61 .height;..................camera
7d40 2e 72 65 63 74 20 3d 20 72 65 63 74 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 .rect.=.rect;..............}....
7d60 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 62 6f 6f 6c 20 ......}............private.bool.
7d80 49 73 44 65 76 69 63 65 55 73 61 62 6c 65 57 69 74 68 50 6c 61 79 65 72 41 63 74 69 6f 6e 73 28 IsDeviceUsableWithPlayerActions(
7da0 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 20 20 7b 0d 0a InputDevice.device)..........{..
7dc0 20 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 64 65 76 69 63 65 20 ............Debug.Assert(device.
7de0 21 3d 20 6e 75 6c 6c 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6d 5f 50 !=.null);................if.(m_P
7e00 6c 61 79 65 72 50 72 65 66 61 62 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 layerPrefab.==.null)............
7e20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 ......return.true;..............
7e40 20 20 76 61 72 20 70 6c 61 79 65 72 49 6e 70 75 74 20 3d 20 6d 5f 50 6c 61 79 65 72 50 72 65 66 ..var.playerInput.=.m_PlayerPref
7e60 61 62 2e 47 65 74 43 6f 6d 70 6f 6e 65 6e 74 49 6e 43 68 69 6c 64 72 65 6e 3c 50 6c 61 79 65 72 ab.GetComponentInChildren<Player
7e80 49 6e 70 75 74 3e 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 6c 61 79 65 Input>();..............if.(playe
7ea0 72 49 6e 70 75 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 rInput.==.null).................
7ec0 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 76 61 72 .return.true;................var
7ee0 20 61 63 74 69 6f 6e 73 20 3d 20 70 6c 61 79 65 72 49 6e 70 75 74 2e 61 63 74 69 6f 6e 73 3b 0d .actions.=.playerInput.actions;.
7f00 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 73 20 3d 3d 20 6e 75 6c 6c .............if.(actions.==.null
7f20 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 74 72 75 65 3b 0d )..................return.true;.
7f40 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 49 66 20 74 68 65 20 61 73 73 65 74 20 68 ...............//.If.the.asset.h
7f60 61 73 20 63 6f 6e 74 72 6f 6c 20 73 63 68 65 6d 65 73 2c 20 73 65 65 20 69 66 20 74 68 65 72 65 as.control.schemes,.see.if.there
7f80 27 73 20 6f 6e 65 20 74 68 61 74 20 77 6f 72 6b 73 20 77 69 74 68 20 74 68 65 20 64 65 76 69 63 's.one.that.works.with.the.devic
7fa0 65 20 70 6c 75 73 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 77 68 61 74 65 76 65 72 20 e.plus..............//.whatever.
7fc0 75 6e 70 61 69 72 65 64 20 64 65 76 69 63 65 73 20 77 65 20 68 61 76 65 20 6c 65 66 74 2e 0d 0a unpaired.devices.we.have.left...
7fe0 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 61 63 74 69 6f 6e 73 2e 63 6f 6e 74 72 6f 6c 53 ............if.(actions.controlS
8000 63 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 chemes.Count.>.0)..............{
8020 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 73 69 6e 67 20 28 76 61 72 20 75 6e 70 ..................using.(var.unp
8040 61 69 72 65 64 44 65 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 airedDevices.=.InputUser.GetUnpa
8060 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 20 20 20 20 20 20 iredInputDevices()).............
8080 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 69 66 20 28 .....{......................if.(
80a0 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 72 6f 6c 53 63 InputControlScheme.FindControlSc
80c0 68 65 6d 65 46 6f 72 44 65 76 69 63 65 73 28 75 6e 70 61 69 72 65 64 44 65 76 69 63 65 73 2c 20 hemeForDevices(unpairedDevices,.
80e0 61 63 74 69 6f 6e 73 2e 63 6f 6e 74 72 6f 6c 53 63 68 65 6d 65 73 2c 0d 0a 20 20 20 20 20 20 20 actions.controlSchemes,.........
8100 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 75 73 74 49 6e 63 6c 75 64 65 44 65 76 69 .................mustIncludeDevi
8120 63 65 3a 20 64 65 76 69 63 65 29 20 3d 3d 20 6e 75 6c 6c 29 0d 0a 20 20 20 20 20 20 20 20 20 20 ce:.device).==.null)............
8140 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 ..............return.false;.....
8160 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 .............}..................
8180 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 0d 0a 20 return.true;..............}.....
81a0 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 4f 74 68 65 72 77 69 73 65 20 6a 75 73 74 20 63 68 65 ...........//.Otherwise.just.che
81c0 63 6b 20 77 68 65 74 68 65 72 20 61 6e 79 20 6f 66 20 74 68 65 20 6d 61 70 73 20 68 61 73 20 62 ck.whether.any.of.the.maps.has.b
81e0 69 6e 64 69 6e 67 73 20 75 73 61 62 6c 65 20 77 69 74 68 20 74 68 65 20 64 65 76 69 63 65 2e 0d indings.usable.with.the.device..
8200 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 74 69 6f 6e .............foreach.(var.action
8220 4d 61 70 20 69 6e 20 61 63 74 69 6f 6e 73 2e 61 63 74 69 6f 6e 4d 61 70 73 29 0d 0a 20 20 20 20 Map.in.actions.actionMaps)......
8240 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
8260 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))...........
8280 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 0d 0a 20 20 20 20 20 ...........return.true;.........
82a0 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d .......return.false;..........}.
82c0 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>........
82e0 20 20 2f 2f 2f 20 43 61 6c 6c 65 64 20 62 79 20 3c 73 65 65 20 63 72 65 66 3d 22 50 6c 61 79 65 ..///.Called.by.<see.cref="Playe
8300 72 49 6e 70 75 74 22 2f 3e 20 77 68 65 6e 20 69 74 20 69 73 20 65 6e 61 62 6c 65 64 2e 0d 0a 20 rInput"/>.when.it.is.enabled....
8320 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 2f .......///.</summary>........../
8340 2f 2f 20 3c 70 61 72 61 6d 20 6e 61 6d 65 3d 22 70 6c 61 79 65 72 22 3e 3c 2f 70 61 72 61 6d 3e //.<param.name="player"></param>
8360 0d 0a 20 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 76 6f 69 64 20 4e 6f 74 69 66 79 50 6c ..........internal.void.NotifyPl
8380 61 79 65 72 4a 6f 69 6e 65 64 28 50 6c 61 79 65 72 49 6e 70 75 74 20 70 6c 61 79 65 72 29 0d 0a ayerJoined(PlayerInput.player)..
83a0 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 41 73 73 ........{..............Debug.Ass
83c0 65 72 74 28 70 6c 61 79 65 72 20 21 3d 20 6e 75 6c 6c 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 ert(player.!=.null);............
83e0 20 20 20 20 55 70 64 61 74 65 53 70 6c 69 74 53 63 72 65 65 6e 28 29 3b 0d 0a 0d 0a 20 20 20 20 ....UpdateSplitScreen();........
8400 20 20 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 ........switch.(m_NotificationBe
8420 68 61 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 havior)..............{..........
8440 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 6e 73 ........case.PlayerNotifications
8460 2e 53 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 .SendMessages:..................
8480 20 20 20 20 53 65 6e 64 4d 65 73 73 61 67 65 28 50 6c 61 79 65 72 4a 6f 69 6e 65 64 4d 65 73 73 ....SendMessage(PlayerJoinedMess
84a0 61 67 65 2c 20 70 6c 61 79 65 72 2c 20 53 65 6e 64 4d 65 73 73 61 67 65 4f 70 74 69 6f 6e 73 2e age,.player,.SendMessageOptions.
84c0 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 20 20 20 20 20 DontRequireReceiver);...........
84e0 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;...............
8500 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 42 72 .....case.PlayerNotifications.Br
8520 6f 61 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 oadcastMessages:................
8540 20 20 20 20 20 20 42 72 6f 61 64 63 61 73 74 4d 65 73 73 61 67 65 28 50 6c 61 79 65 72 4a 6f 69 ......BroadcastMessage(PlayerJoi
8560 6e 65 64 4d 65 73 73 61 67 65 2c 20 70 6c 61 79 65 72 2c 20 53 65 6e 64 4d 65 73 73 61 67 65 4f nedMessage,.player,.SendMessageO
8580 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 29 3b 0d 0a 20 20 ptions.DontRequireReceiver);....
85a0 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 0a 20 20 20 20 ..................break;........
85c0 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 69 63 61 74 ............case.PlayerNotificat
85e0 69 6f 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 ions.InvokeUnityEvents:.........
8600 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 5f 50 6c 61 79 65 72 4a 6f 69 6e 65 64 45 76 65 6e 74 .............m_PlayerJoinedEvent
8620 3f 2e 49 6e 76 6f 6b 65 28 70 6c 61 79 65 72 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ?.Invoke(player);...............
8640 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 20 20 .......break;...................
8660 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 6b 65 .case.PlayerNotifications.Invoke
8680 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 20 20 20 20 CSharpEvents:...................
86a0 20 20 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 ...DelegateHelpers.InvokeCallbac
86c0 6b 73 53 61 66 65 28 72 65 66 20 6d 5f 50 6c 61 79 65 72 4a 6f 69 6e 65 64 43 61 6c 6c 62 61 63 ksSafe(ref.m_PlayerJoinedCallbac
86e0 6b 73 2c 20 70 6c 61 79 65 72 2c 20 22 6f 6e 50 6c 61 79 65 72 4a 6f 69 6e 65 64 22 29 3b 0d 0a ks,.player,."onPlayerJoined");..
8700 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;......
8720 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 ........}..........}............
8740 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 43 61 6c 6c 65 ///.<summary>..........///.Calle
8760 64 20 62 79 20 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 77 d.by.<see.cref="PlayerInput"/>.w
8780 68 65 6e 20 69 74 20 69 73 20 64 69 73 61 62 6c 65 64 2e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 2f hen.it.is.disabled...........///
87a0 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 20 .</summary>..........///.<param.
87c0 6e 61 6d 65 3d 22 70 6c 61 79 65 72 22 3e 3c 2f 70 61 72 61 6d 3e 0d 0a 20 20 20 20 20 20 20 20 name="player"></param>..........
87e0 69 6e 74 65 72 6e 61 6c 20 76 6f 69 64 20 4e 6f 74 69 66 79 50 6c 61 79 65 72 4c 65 66 74 28 50 internal.void.NotifyPlayerLeft(P
8800 6c 61 79 65 72 49 6e 70 75 74 20 70 6c 61 79 65 72 29 0d 0a 20 20 20 20 20 20 20 20 7b 0d 0a 20 layerInput.player)..........{...
8820 20 20 20 20 20 20 20 20 20 20 20 44 65 62 75 67 2e 41 73 73 65 72 74 28 70 6c 61 79 65 72 20 21 ...........Debug.Assert(player.!
8840 3d 20 6e 75 6c 6c 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 55 70 64 61 74 65 53 70 =.null);................UpdateSp
8860 6c 69 74 53 63 72 65 65 6e 28 29 3b 0d 0a 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 73 77 69 74 litScreen();................swit
8880 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 20 ch.(m_NotificationBehavior).....
88a0 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 65 .........{..................case
88c0 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
88e0 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 73 s:......................SendMess
8900 61 67 65 28 50 6c 61 79 65 72 4c 65 66 74 4d 65 73 73 61 67 65 2c 20 70 6c 61 79 65 72 2c 20 53 age(PlayerLeftMessage,.player,.S
8920 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 65 52 65 63 endMessageOptions.DontRequireRec
8940 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 20 62 72 65 eiver);......................bre
8960 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 61 79 ak;....................case.Play
8980 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 73 61 67 65 erNotifications.BroadcastMessage
89a0 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 64 63 61 73 s:......................Broadcas
89c0 74 4d 65 73 73 61 67 65 28 50 6c 61 79 65 72 4c 65 66 74 4d 65 73 73 61 67 65 2c 20 70 6c 61 79 tMessage(PlayerLeftMessage,.play
89e0 65 72 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 er,.SendMessageOptions.DontRequi
8a00 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 20 reReceiver);....................
8a20 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 65 ..break;....................case
8a40 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 6e 69 74 79 .PlayerNotifications.InvokeUnity
8a60 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 20 6d 5f 50 Events:......................m_P
8a80 6c 61 79 65 72 4c 65 66 74 45 76 65 6e 74 3f 2e 49 6e 76 6f 6b 65 28 70 6c 61 79 65 72 29 3b 0d layerLeftEvent?.Invoke(player);.
8aa0 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 0a 20 .....................break;.....
8ac0 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 69 ...............case.PlayerNotifi
8ae0 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 20 20 cations.InvokeCSharpEvents:.....
8b00 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 72 73 .................DelegateHelpers
8b20 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 50 6c 61 79 65 .InvokeCallbacksSafe(ref.m_Playe
8b40 72 4c 65 66 74 43 61 6c 6c 62 61 63 6b 73 2c 20 70 6c 61 79 65 72 2c 20 22 6f 6e 50 6c 61 79 65 rLeftCallbacks,.player,."onPlaye
8b60 72 4c 65 66 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 rLeft");......................br
8b80 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;..............}..........}..
8ba0 0d 0a 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 ..........[Serializable]........
8bc0 20 20 70 75 62 6c 69 63 20 63 6c 61 73 73 20 50 6c 61 79 65 72 4a 6f 69 6e 65 64 45 76 65 6e 74 ..public.class.PlayerJoinedEvent
8be0 20 3a 20 55 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 .:.UnityEvent<PlayerInput>......
8c00 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 5b 53 65 72 ....{..........}............[Ser
8c20 69 61 6c 69 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 ializable]..........public.class
8c40 20 50 6c 61 79 65 72 4c 65 66 74 45 76 65 6e 74 20 3a 20 55 6e 69 74 79 45 76 65 6e 74 3c 50 6c .PlayerLeftEvent.:.UnityEvent<Pl
8c60 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 7d ayerInput>..........{..........}
8c80 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 00 00 00 00 01 00 00 00 80 b9 2a 00 00 00 00 00 00 00 00 00 ......}..}............*.........
8ca0 12 00 00 00 50 6c 61 79 65 72 49 6e 70 75 74 4d 61 6e 61 67 65 72 00 00 17 00 00 00 55 6e 69 74 ....PlayerInputManager......Unit
8cc0 79 45 6e 67 69 6e 65 2e 49 6e 70 75 74 53 79 73 74 65 6d 00 yEngine.InputSystem.