实现游戏大厅与房间模块:玩法插件化、匹配与房间生命周期管理

This commit is contained in:
2026-09-28 00:10:11 +08:00
parent 99d1827262
commit fb5a730ef3
19 changed files with 2492 additions and 18 deletions
+5
View File
@@ -14,6 +14,7 @@ import (
"time"
"git.lzcwy.cn/zhengchiliu/zt-online-game-backend/global"
"git.lzcwy.cn/zhengchiliu/zt-online-game-backend/internal/boot"
"git.lzcwy.cn/zhengchiliu/zt-online-game-backend/internal/mysqlmodel"
"git.lzcwy.cn/zhengchiliu/zt-online-game-backend/internal/routers"
"git.lzcwy.cn/zhengchiliu/zt-online-game-backend/pkg/cos"
@@ -36,11 +37,15 @@ func init() {
}
setupCosClient()
boot.InitWS() // 初始化 WebSocket 模块:房间管理器、匹配器与消息路由
}
func main() {
gin.SetMode(global.ServerSetting.RunMode)
boot.Start(context.Background()) // 启动匹配队列扫描(随进程退出结束)
router := routers.NewRouter()
s := &http.Server{