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(); }
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); }
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); } } }
public TestPlugin(Client client) { _protocol = new ClientProtocol(client); universe = new Universe(); }