private static void OnServerResponse(IAsyncResult result) { AsyncResult res = (AsyncResult)result; myCallbackDelegate deleg = (myCallbackDelegate)res.AsyncDelegate; serverResponse = deleg.EndInvoke(result); Debug.Log("GOT RESPONSE FROM SERVER: " + serverResponse); GameDataManager.instance.NotifyAsync(serverResponse); }
public virtual void Initialize(ServiceContainer services, GraphicsDevice gd, myCallbackDelegate updateCamCallback) { Services = services; graphicsDevice = gd; UpdateCameraCallback = updateCamCallback; try { InitializeContent(); InitializeCameras(); InitializeEnvironment(); InitializeInputs(); InitializeSound(); } catch (Exception e) { System.Diagnostics.Debug.WriteLine(e.StackTrace); } }
public void Initialize(ServiceContainer services, GraphicsDevice gd, myCallbackDelegate updateCamCallback) { Services = services; graphicsDevice = gd; UpdateCameraCallback = updateCamCallback; try { InitializeContent(); InitializeCameras(); InitializeEnvironment(); InitializeInputs(); InitializeSound(); } catch (Exception e) { System.Diagnostics.Trace.WriteLine(e.StackTrace); } if (isClient && commClient != null) { commClient.Send(new ClientReadyPacket(MyClientID, "someone")); } }
public void Initialize(ServiceContainer services, GraphicsDevice gd, myCallbackDelegate updateCamCallback) { Services = services; graphicsDevice = gd; UpdateCameraCallback = updateCamCallback; try { InitializeContent(); InitializeCameras(); InitializeEnvironment(); InitializeInputs(); InitializeSound(); } catch (Exception e) { System.Diagnostics.Trace.WriteLine(e.StackTrace); } if (isClient && commClient!=null) commClient.Send(new ClientReadyPacket(MyClientID, "someone")); }
public static void GetNetworkUTCTimeAsync() { myCallbackDelegate deleg = new myCallbackDelegate(new AsyncTasks().GetNISTDate); deleg.BeginInvoke(false, new AsyncCallback(OnServerResponse), null); }