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

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

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

            SendSecondCommandCommand(commandRequest, callback);
        }