refactor: wip
This commit is contained in:
parent
4b61948f68
commit
0cb7131435
5 changed files with 69 additions and 45 deletions
|
|
@ -1,3 +1,6 @@
|
|||
using CoreNet.Config;
|
||||
using GB.Config;
|
||||
using GB.Core;
|
||||
using GB.Game;
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
|
|
@ -29,6 +32,13 @@ public class GBSUServer : MonoBehaviour
|
|||
localSingleGang?.SetValue(false);
|
||||
}
|
||||
|
||||
public static void StartServer()
|
||||
{
|
||||
RotationConfig gameConfig = GBConfigLoader.LoadRotationConfig("config.json", true); // load rotation config from Config/Rotation/config.json
|
||||
ServerConfig serverConfig = NetConfigLoader.LoadServerConfig(); // load default server config, because it can be overridden by args like -ip and -port
|
||||
MonoSingleton<Global>.Instance.UNetManager.LaunchServer(serverConfig); // launch the server with the server config
|
||||
MonoSingleton<Global>.Instance.UNetManager.GetComponent<GameManagerNew>().ChangeRotationConfig(gameConfig, 0); // set server's rotationconfig
|
||||
}
|
||||
/*
|
||||
public string GetRemainingRoundTime()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue