This commit is contained in:
huyulong 2025-01-03 11:38:37 +08:00
parent 7e4379fbcb
commit 4a9233364c
2 changed files with 6 additions and 2 deletions

View File

@ -904,7 +904,7 @@ string HandleButtoncallId=11;//
}
if (userJoinResponse.MessageType == 11)//房间开始
{
GameObject.Find("HostCanvas").GetComponent<Starthost>().isSatisfy = true;
Debug.LogWarning("·¿¼ä¿ªÊ¼");
test111.instance.Oppanel();
}
if (userJoinResponse.MessageType == 12)//玩家准备
@ -913,6 +913,7 @@ string HandleButtoncallId=11;//
{
Debug.Log("服务器给准备好消息");
GameObject.Find("HostCanvas").GetComponent<Starthost>().start.interactable = true;
GameObject.Find("HostCanvas").GetComponent<Starthost>().isSatisfy = true;
}
}

View File

@ -63,6 +63,7 @@ public class Starthost : MonoBehaviour
}
void Start()
{
test.lodingWebSocket(ReadRoom.instance.ID);
closeBtn.onClick.AddListener(() =>
{
Renyuan.SetActive(false);
@ -104,8 +105,10 @@ public class Starthost : MonoBehaviour
ready.gameObject.SetActive(false);
posiBtn.gameObject.SetActive(true);
start.gameObject.SetActive(true);
test.JoinRoom(ReadRoom.instance.roomid);
test.PlayerReady(ReadRoom.instance.roomid, true);
}
test.lodingWebSocket(ReadRoom.instance.ID);
}
void OnEnable()
{