1
This commit is contained in:
@@ -157,6 +157,26 @@ public partial class WebSocketSendList
|
||||
var sendObj = new WebSocketSendList("Bind", userId);
|
||||
WebSocketManager.Instance.Send(SocketType.login, JsonConvert.SerializeObject(sendObj));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 断线重连(必须先调用,重新加入房间前调用)
|
||||
/// 对应服务端 FishGameHub.Reconnect(string userId)
|
||||
/// </summary>
|
||||
public static void Reconnect(string userId)
|
||||
{
|
||||
var sendObj = new WebSocketSendList("Reconnect", userId);
|
||||
WebSocketManager.Instance.Send(SocketType.game, JsonConvert.SerializeObject(sendObj));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取玩家信息(结果通过 SendPlayerInfoResult 事件返回)
|
||||
/// 对应服务端 FishGameHub.GetPlayerInfo(string roomId, string userId)
|
||||
/// </summary>
|
||||
public static void GetPlayerInfo(string roomId, string userId)
|
||||
{
|
||||
var sendObj = new WebSocketSendList("GetPlayerInfo", roomId, userId);
|
||||
WebSocketManager.Instance.Send(SocketType.game, JsonConvert.SerializeObject(sendObj));
|
||||
}
|
||||
/// <summary>
|
||||
/// 加入房间
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user