Beispiel #1
0
        public void SendFirstCommandCommand(NonBlittableComponent.FirstCommand.Request request, Action <Improbable.Gdk.Tests.NonblittableTypes.NonBlittableComponent.FirstCommand.ReceivedResponse> callback = null)
        {
            int validCallbackEpoch = callbackEpoch;
            var requestId          = commandSender.SendCommand(request, entity);

            if (callback != null)
            {
                Action <Improbable.Gdk.Tests.NonblittableTypes.NonBlittableComponent.FirstCommand.ReceivedResponse> wrappedCallback = response =>
                {
                    if (!this.IsValid || validCallbackEpoch != this.callbackEpoch)
                    {
                        return;
                    }

                    callback(response);
                };
                callbackSystem.RegisterCommandResponseCallback(requestId, wrappedCallback);
            }
        }
Beispiel #2
0
        public void SendFirstCommandCommand(EntityId targetEntityId, global::Improbable.Gdk.Tests.NonblittableTypes.FirstCommandRequest request, Action <global::Improbable.Gdk.Tests.NonblittableTypes.NonBlittableComponent.FirstCommand.ReceivedResponse> callback = null)
        {
            var commandRequest = new NonBlittableComponent.FirstCommand.Request(targetEntityId, request);

            SendFirstCommandCommand(commandRequest, callback);
        }