示例#1
0
文件: Core.cs 项目: sopindm/bjeb
        public override void OnStart(StartState state)
        {
            base.OnStart(state);

            var client = new Client("127.0.0.1", 4400, onConnectionSetup);
            _protocol = new ClientProtocol(client);
            _universe = new game.Universe();
        }
示例#2
0
        public ClientProtocol(Client client)
        {
            _client = client;

            _settings = new DebugSettings();
            _guiUpdateHandler = new UpdateHandler(_settings.guiUpdateRate);
            _stateUpdateHandler = new UpdateHandler(_settings.stateUpdateRate);

            _windows = null;

            _background = new Task(_requestGui);
        }
示例#3
0
文件: Main.cs 项目: sopindm/bjeb
        public static void Main(string[] args)
        {
            Client client = new Client("127.0.0.1", 4400);
            TestPlugin plugin = new TestPlugin(client);

            client.onSetup = plugin.setup;

            while (true)
            {
                plugin.update();

                if(!client.connected)
                {
                    Console.WriteLine("No connection");
                    System.Threading.Thread.Sleep(1000);
                }
            }
        }
示例#4
0
文件: Main.cs 项目: sopindm/bjeb
 public TestPlugin(Client client)
 {
     _protocol = new ClientProtocol(client);
     universe = new Universe();
 }