Beispiel #1
0
        IDiffCommandResponseStorage <WorldCommands.EntityQuery.ReceivedResponse> .GetResponse(long requestId)
        {
            if (!entityQueriesSorted)
            {
                entityQueryResponses.Sort(comparer);
                entityQueriesSorted = true;
            }

            var responseIndex = entityQueryResponses.GetResponseIndex(requestId);

            if (responseIndex < 0)
            {
                return(ReceivedMessagesSpan <WorldCommands.EntityQuery.ReceivedResponse> .Empty());
            }

            return(new ReceivedMessagesSpan <WorldCommands.EntityQuery.ReceivedResponse>(entityQueryResponses,
                                                                                         responseIndex, 1));
        }
Beispiel #2
0
        IDiffCommandResponseStorage <WorldCommands.CreateEntity.ReceivedResponse> .GetResponse(long requestId)
        {
            if (!createEntitySorted)
            {
                createEntityResponses.Sort(comparer);
                createEntitySorted = true;
            }

            var responseIndex = createEntityResponses.GetResponseIndex(requestId);

            if (responseIndex < 0)
            {
                return(ReceivedMessagesSpan <WorldCommands.CreateEntity.ReceivedResponse> .Empty());
            }

            return(new ReceivedMessagesSpan <WorldCommands.CreateEntity.ReceivedResponse>(createEntityResponses,
                                                                                          responseIndex, 1));
        }
Beispiel #3
0
        IDiffCommandResponseStorage <WorldCommands.ReserveEntityIds.ReceivedResponse> .GetResponse(long requestId)
        {
            if (!reserveEntityIdsSorted)
            {
                reserveEntityIdsResponses.Sort(comparer);
                reserveEntityIdsSorted = true;
            }

            var responseIndex = reserveEntityIdsResponses.GetResponseIndex(requestId);

            if (responseIndex < 0)
            {
                return(ReceivedMessagesSpan <WorldCommands.ReserveEntityIds.ReceivedResponse> .Empty());
            }

            return(new ReceivedMessagesSpan <WorldCommands.ReserveEntityIds.ReceivedResponse>(reserveEntityIdsResponses,
                                                                                              responseIndex, 1));
        }