From bbf470f621bce14e29d8ab9086c66429e40f4da8 Mon Sep 17 00:00:00 2001 From: YangHua <1475658476@qq.com> Date: Wed, 22 Nov 2023 15:43:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A0=E9=99=A4user?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Temp/Scripts/Taskpanel.cs | 4 ++-- Assets/Zion/Scripts/Adam/GameManager.cs | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Assets/Temp/Scripts/Taskpanel.cs b/Assets/Temp/Scripts/Taskpanel.cs index 8e4f4615..9b0bbdd3 100644 --- a/Assets/Temp/Scripts/Taskpanel.cs +++ b/Assets/Temp/Scripts/Taskpanel.cs @@ -149,8 +149,8 @@ public class Taskpanel : MonoBehaviour { Debug.Log("OnGetLeaveRoomsInfo====" + msg); string[] info = msg.Split(','); - GameManager.Instance.RemovePlayer(ulong.Parse(info[0])); - SceneManager.LoadScene("SampleScene"); + string _msg = $"send2room offline,{info[3]}"; + _ = SyncCreateRoom.SendMessageAsync(_msg); } public void OnLeaveRoom() { diff --git a/Assets/Zion/Scripts/Adam/GameManager.cs b/Assets/Zion/Scripts/Adam/GameManager.cs index a8ca953a..d098caf1 100644 --- a/Assets/Zion/Scripts/Adam/GameManager.cs +++ b/Assets/Zion/Scripts/Adam/GameManager.cs @@ -202,7 +202,8 @@ public class GameManager : MonoSingleton } break; case "offline": - + RemovePlayer(ulong.Parse(data[3])); + SceneManager.LoadScene("SampleScene"); break; default: break; @@ -210,9 +211,6 @@ public class GameManager : MonoSingleton } } - - - public void SpawnDevice(GameObject devicePrefab, string[] data = null, string deviceID = null) { GameObject obj = Instantiate(devicePrefab);