This commit is contained in:
YangHua 2024-01-23 18:02:29 +08:00
parent 32798355eb
commit 26cdd8ed03
2 changed files with 3075 additions and 4 deletions

View File

@ -220,7 +220,6 @@ public class GameManager : MonoSingleton<GameManager>
{
yield return new WaitForSeconds(0.5f);
string[] data = msg.Split(',');
//Debug.Log($"<color=green>{data[0]}+{data[1]}</color>");
switch (data[0])
{
case "online":
@ -228,11 +227,9 @@ public class GameManager : MonoSingleton<GameManager>
if (!userIds.Contains(userId))
{
SyncPlayerTransform spt = Instantiate(playerTransformPrefab);
//spt.GetComponent<Camera>().cullingMask = ~(1 << 15);
//0 red 1 blue
if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) == "0")
{
//spt.GetComponent<Camera>().cullingMask = ~(1 << 15);
spt.gameObject.transform.position = redSpawnPos.position;
spt.gameObject.transform.eulerAngles = redSpawnPos.eulerAngles;
}
@ -243,7 +240,7 @@ public class GameManager : MonoSingleton<GameManager>
}
spt.gameObject.SetActive(true);
spt.SetPlayerInfo(userId, data[2], ulong.Parse(data[3]), false);
spt.GetComponent<Camera>().cullingMask &= ~(1 << 15);
//spt.GetComponent<Camera>().cullingMask &= ~(1 << 15);
AddPlayers(spt);
}
break;