This commit is contained in:
YangHua 2023-11-17 15:52:07 +08:00
parent b1c54e7f3f
commit fb2d1ef9a5
4 changed files with 19 additions and 4 deletions

View File

@ -724,7 +724,7 @@ public class View_Panel2 : XUIPanel
if (upsd.state)
{
submitInstruct.text = "提交成功";
GlobalFlag.practiceSeatId = practiceSeatId;
}
else
{
@ -843,7 +843,21 @@ public class View_Panel2 : XUIPanel
{
CreateAllUser(dataItemTemp);
}
}
private void OnDisable()
{
Debug.Log("OnDisable");
AdamSync.SyncCreateRoom.createRoomRequset -= OnCreateRoom;
AdamSync.SyncCreateRoom.joinRoomRequset += OnJoinRoom;
AdamSync.SyncCreateRoom.getRoomsRequset += OnGetRooms;
}
private void OnDestory()
{
Debug.Log("OnDestory");
AdamSync.SyncCreateRoom.createRoomRequset -= OnCreateRoom;
AdamSync.SyncCreateRoom.joinRoomRequset -= OnJoinRoom;
AdamSync.SyncCreateRoom.getRoomsRequset -= OnGetRooms;
}
}

View File

@ -24,7 +24,7 @@ public class GameManager : MonoBehaviour
spt.gameObject.transform.position = spawnPos.position;
spt.gameObject.transform.eulerAngles = spawnPos.eulerAngles;
spt.SetPlayerInfo(ulong.Parse(GlobalFlag.currentUser.user_id), GlobalFlag.currentUser.login_name, ulong.Parse(GlobalFlag.roomID), true);
if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.roomID) == "0")
if (UIBootstrap.Instance.GetRoleByIDPracticeId(GlobalFlag.practiceSeatId) == "0")
{
spt.GetComponent<Camera>().cullingMask = ~(1 << 11);
}

View File

@ -46,7 +46,7 @@ public class UIBootstrap : MonoSingleton<UIBootstrap>
{
for (int i = 0; i < subjectInfo.Count; i++)
{
if (subjectInfo[i].SeatId == practiceID)
if (subjectInfo[i].Id == practiceID)
{
return subjectInfo[i].Role;
}

View File

@ -7,4 +7,5 @@ public class GlobalFlag
public static UserInfo currentUser;
public static string roomID;
public static string practiceId;
public static string practiceSeatId;
}