222
This commit is contained in:
parent
20ef229f32
commit
1820f61d6f
|
@ -148,12 +148,11 @@ public class Taskpanel : MonoBehaviour
|
||||||
{
|
{
|
||||||
string[] data = msg.Split(',');
|
string[] data = msg.Split(',');
|
||||||
Debug.Log(data[1]);
|
Debug.Log(data[1]);
|
||||||
if(data[0] == "offline")
|
if (data[0] == "offline")
|
||||||
{
|
{
|
||||||
GameManager.Instance.RemovePlayer(ulong.Parse(data[1]));
|
GameManager.Instance.RemovePlayer(ulong.Parse(data[1]));
|
||||||
string _msg = "leaveroom ";
|
string _msg = "leaveroom ";
|
||||||
_ = SyncCreateRoom.SendMessageAsync(_msg);
|
_ = SyncCreateRoom.SendMessageAsync(_msg);
|
||||||
SceneManager.LoadScene("SampleScene");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,6 +161,7 @@ public class Taskpanel : MonoBehaviour
|
||||||
{
|
{
|
||||||
Debug.Log("Leaveroom");
|
Debug.Log("Leaveroom");
|
||||||
_ = SyncCreateRoom.SendMessageAsync($"send2room offline,{GlobalFlag.currentUser.user_id}");
|
_ = SyncCreateRoom.SendMessageAsync($"send2room offline,{GlobalFlag.currentUser.user_id}");
|
||||||
|
SceneManager.LoadScene("SampleScene");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,7 +136,6 @@ public class GameManager : MonoSingleton<GameManager>
|
||||||
{
|
{
|
||||||
if (players[i].userID == playerID)
|
if (players[i].userID == playerID)
|
||||||
{
|
{
|
||||||
players.Remove(players[i]);
|
|
||||||
Destroy(players[i].gameObject);
|
Destroy(players[i].gameObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue