示例#1
0
        public DemoServer()
        {
            ServerPacketHandler.HoldCode.Init();

            demoServer = this;
            serverData = new ServerData();
            serverData.LoadData();

            Debug.Log("Init DemoServer");
            sth = new ServerThread();
            var t = new Thread(new ThreadStart(sth.run));

            t.Start();
        }
示例#2
0
        void Awake()
        {
            loginInit = this;

            if (SaveGame.saveGame == null)
            {
                var saveGame = new GameObject("SaveGame");
                saveGame.AddComponent <SaveGame>();
                saveGame.GetComponent <SaveGame>().InitData();
                saveGame.GetComponent <SaveGame>().InitServerList();
            }
            var sd = new ServerData();

            sd.LoadData();
        }