This commit is contained in:
2026-07-20 22:32:52 +08:00
parent 61b9b9a3e6
commit 9977ce1fc9
17 changed files with 254 additions and 109 deletions
@@ -320,6 +320,20 @@ namespace Assets.MyGame.Scripts.Net
}, callback);
}
/// <summary>
/// 快速加入房间(GET /api/Room/QuickJoin?gameType=&level=)
/// 返回:QuickJoinResponse(roomId + url)
/// 后端自动分配房间和座位,客户端拿到后用 url 连 socket,再调 JoinRoom(roomId, userId, -1)
/// </summary>
public static void RoomQuickJoin(int gameType, int level, Action<QuickJoinResponse> callback)
{
APIManager.Response<QuickJoinResponse>(APIType.Room_QuickJoin, new RoomQuickJoinParam
{
gameType = gameType,
level = level
}, callback);
}
/// <summary>
/// 使用VIP经验包(GET /api/Hall/UseVipExp)
/// 返回:string