This commit is contained in:
YangHua 2023-11-23 23:01:44 +08:00
parent 6324d2547a
commit b9e9c7e5b8
2 changed files with 22 additions and 16 deletions

View File

@ -479,10 +479,15 @@ public class View_Panel2 : XUIPanel
//加入房间
Debug.Log("进入训练");
if (UIBootstrap.Instance.IsAllocate())
{
string RoomName = "joinroom " + currentRoomName;
_ = AdamSync.SyncCreateRoom.SendMessageAsync(RoomName);
}
else
{
Debug.Log($"<color=blue>没有分配席位</color>");
}
});
///进入导调
entering_key_btn.onClick.AddListener(() =>

View File

@ -101,17 +101,18 @@ public class UIBootstrap : MonoSingleton<UIBootstrap>
}
return "0";
}
///// <summary>
///// 是否分配角色
///// </summary>
//public bool IsAllocate()
//{
// string currentName =
// for(int i = 0;i < subjectInfo.Count; i++)
// {
// }
//}
/// <summary>
/// 是否分配角色
/// </summary>
public bool IsAllocate()
{
for (int i = 0; i < subjectInfo.Count; i++)
{
if(subjectInfo[i].UserAccount== GlobalFlag.currentUser.login_name)
return true;
}
return false;
}