feat 机器人

This commit is contained in:
2025-12-17 09:56:01 +08:00
parent 0274262591
commit d602a16b15
14 changed files with 540 additions and 0 deletions

15
Server/robot/ws/router.go Normal file
View File

@@ -0,0 +1,15 @@
package ws
import "common/proto/sc/sc_pb"
var router map[sc_pb.MessageID]BaseRouter
type BaseRouter interface {
Handle(data []byte, client *Client)
}
func init() {
router = make(map[sc_pb.MessageID]BaseRouter)
router[sc_pb.MessageID_MESSAGE_ID_ENTER_INSTANCE] = &EnterInstance{}
router[sc_pb.MessageID_MESSAGE_ID_POSITION] = &Position{}
}