Exemplo n.º 1
0
    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);
    }
Exemplo n.º 2
0
        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);
            }

        }
Exemplo n.º 3
0
        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"));
            }
        }
Exemplo n.º 4
0
        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"));
        }
Exemplo n.º 5
0
    public static void GetNetworkUTCTimeAsync()
    {
        myCallbackDelegate deleg = new myCallbackDelegate(new AsyncTasks().GetNISTDate);

        deleg.BeginInvoke(false, new AsyncCallback(OnServerResponse), null);
    }