예제 #1
0
        public Server(WorldPersistence worldPersistence, World world, ServerConfig serverConfig, Communication.NitroxServer server)
        {
            this.worldPersistence = worldPersistence;
            this.serverConfig     = serverConfig;
            this.server           = server;
            this.world            = world;

            Instance = this;

            saveTimer           = new Timer();
            saveTimer.Interval  = serverConfig.SaveInterval;
            saveTimer.AutoReset = true;
            saveTimer.Elapsed  += delegate
            {
                Save();
            };
        }