mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-17 12:12:26 +08:00
拆分战斗服务器
This commit is contained in:
@@ -9,15 +9,14 @@ import (
|
||||
"time"
|
||||
|
||||
"hk4e/common/config"
|
||||
"hk4e/common/mq"
|
||||
"hk4e/gdconf"
|
||||
gdc "hk4e/gs/config"
|
||||
"hk4e/gs/constant"
|
||||
"hk4e/gs/dao"
|
||||
"hk4e/gs/game"
|
||||
"hk4e/gs/mq"
|
||||
"hk4e/gs/service"
|
||||
"hk4e/pkg/logger"
|
||||
"hk4e/protocol/cmd"
|
||||
|
||||
"github.com/nats-io/nats.go"
|
||||
)
|
||||
@@ -46,14 +45,10 @@ func Run(ctx context.Context, configFile string) error {
|
||||
}
|
||||
defer db.CloseDao()
|
||||
|
||||
netMsgInput := make(chan *cmd.NetMsg, 10000)
|
||||
netMsgOutput := make(chan *cmd.NetMsg, 10000)
|
||||
|
||||
messageQueue := mq.NewMessageQueue(conn, netMsgInput, netMsgOutput)
|
||||
messageQueue.Start()
|
||||
messageQueue := mq.NewMessageQueue(mq.GS, "1")
|
||||
defer messageQueue.Close()
|
||||
|
||||
gameManager := game.NewGameManager(db, netMsgInput, netMsgOutput)
|
||||
gameManager := game.NewGameManager(db, messageQueue)
|
||||
gameManager.Start()
|
||||
defer gameManager.Stop()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user