游戏节点配置嵌入在一个配置文件中

This commit is contained in:
2024-12-10 16:41:16 +08:00
parent 37fb40672a
commit 193fa806c2
9 changed files with 85 additions and 34 deletions

16
config/game/game.go Normal file
View File

@@ -0,0 +1,16 @@
package game
type Config any
func NewConfig(point int) Config {
switch point {
case 4:
return ConfigPush{}
case 5:
return ConfigWait{}
default:
return nil
}
}
var G Config