public void StartServer() { if (GameServer != null) { return; } var serverWorldGO = new GameObject("Server World"); var serverWorld = serverWorldGO.AddComponent <World>(); var ctx = new ServerGameContext() { World = serverWorld, Port = Port, ReplicaManagerSettings = ReplicaManagerSettings, LagSettings = LagSettings }; GameServer = CreateServer(ctx); OnServerRunning(); }
public GameModeBase(ServerGame server) { this.server = server; InstantiateGameState(); }