game_sync/worldsrv/coinscenematch.go

25 lines
740 B
Go

package main
import "mongo.games.com/game/common"
type FuncCoinSceneMatch func(csp *CoinScenePool, p *Player, scenes map[int]*Scene, sameIpLimit bool, exclude []int32) *Scene
var coinSceneMatchFuncPool = make(map[int]FuncCoinSceneMatch)
// RegisterCoinSceneMatchFunc 注册游戏匹配房间的方式
func RegisterCoinSceneMatchFunc(gameId int, f FuncCoinSceneMatch) {
coinSceneMatchFuncPool[gameId] = f
}
func GetCoinSceneMatchFunc(gameId int) FuncCoinSceneMatch {
if f, exist := coinSceneMatchFuncPool[gameId]; exist {
return f
}
return nil
}
func init() {
RegisterCoinSceneMatchFunc(common.GameId_ChesstitiansCambodian, ChessMatchFunc)
RegisterCoinSceneMatchFunc(common.GameId_ChesstitiansCambodianRobot, ChessMatchFunc)
}