public void StartServer()
    {
        if (Mode != Mode.Inactive)
        {
            throw new ApplicationException("Can't start server if already active.");
        }

        SetupHooks(_contexts);

        _server          = new ServerNetworkSystem(_contexts);
        _server.TickRate = (ushort)TargetTickPerSecond;

        var services = new Services
        {
            ServerSystem = _server
        };

        _serverFeature = new ServerFeature(_contexts, services);
        Mode           = Mode.Server;
    }
Example #2
0
 public ServerCaptureRemovedDirectionSystem(Contexts contexts, Services services) : base(contexts.game)
 {
     _server = services.ServerSystem;
 }
 public ServerCaptureCreatedEntitiesSystem(Contexts contexts, Services services) : base(contexts.game)
 {
     _server = services.ServerSystem;
 }
 public ServerCaptureChangedPositionSystem(Contexts contexts, Services services) : base(contexts.game)
 {
     _server = services.ServerSystem;
 }
 public ServerCaptureRemovedControlledBySystem(Contexts contexts, Services services) : base(contexts.game)
 {
     _server = services.ServerSystem;
 }
Example #6
0
 public EnsureServerSystem(Contexts contexts, Services services)
 {
     _context = contexts.game;
     _server  = services.ServerSystem;
 }
 public ServerCaptureChangedLastMoveTickSystem(Contexts contexts, Services services) : base(contexts.game)
 {
     _server = services.ServerSystem;
 }