/// <summary> /// 初始化<see cref="MapBase"/> /// </summary> public MapBase() { SafeAreas = new List <Area>(); HealthData = Data.GetTable("user", "health"); location = Data.GetTable("user", "location"); players = new List <Player>(); blocks = new List <Block>(); ThrowItems = new ThrowOutItems(this); thrownOutItems = new ThrownOutItems(this); ReadBlocks(); loopThread = new Thread(Loop); loopThread.IsBackground = true; loopThread.Priority = ThreadPriority.BelowNormal; loopThread.Start(); delays = new List <Delay>(); Trees = new TreeGen(this); Trees.Init(); sky = new SkySystem(this); saveDelay = new Delay(this); saveDelay.SetDelay(5000, WriteBlocks); NPCManager.InitMap(this); //Block block3 = new Block(); //block3.blockId = "TestBlock03"; //block3.updateLocation = new Vector3(548.14f, 32.61f, 588.11f); //block3.updateRotation = new Vector3(0f, 0f, 0f); //blocks.Add(block3); ForgetiveServer.OnPlayerQuit.Reg(OnPlayerQuit); Init(); }