Exemplo n.º 1
0
        public void SendEntityQueryRequest(Worker.Query.EntityQuery entityQuery, uint timeoutMillis = 0)
        {
            WorldCommandsTranslation translation =
                (WorldCommandsTranslation)ComponentTranslation.HandleToTranslation[HandleToTranslation];

            translation.EntityQueryRequests.Add(new EntityQueryRequest
            {
                EntityQuery    = entityQuery,
                TimeoutMillis  = timeoutMillis,
                SenderEntityId = EntityId
            });
        }
Exemplo n.º 2
0
        public void SendDeleteEntityRequest(long entityId, uint timeoutMillis = 0)
        {
            WorldCommandsTranslation translation =
                (WorldCommandsTranslation)ComponentTranslation.HandleToTranslation[HandleToTranslation];

            translation.DeleteEntityRequests.Add(new DeleteEntityRequest
            {
                EntityId       = entityId,
                TimeoutMillis  = timeoutMillis,
                SenderEntityId = EntityId
            });
        }
Exemplo n.º 3
0
        public void SendReserveEntityIdsRequest(uint numberOfEntities, uint timeoutMillis = 0)
        {
            WorldCommandsTranslation translation =
                (WorldCommandsTranslation)ComponentTranslation.HandleToTranslation[HandleToTranslation];

            translation.ReserveEntityIdsRequests.Add(new ReserveEntityIdsRequest
            {
                NumberOfEntityIds = numberOfEntities,
                TimeoutMillis     = timeoutMillis,
                SenderEntityId    = EntityId
            });
        }
Exemplo n.º 4
0
        public void SendCreateEntityRequest(Worker.Entity entity, long entityId = 0, uint timeoutMillis = 0)
        {
            WorldCommandsTranslation translation =
                (WorldCommandsTranslation)ComponentTranslation.HandleToTranslation[HandleToTranslation];
            var entityIdOption = new EntityId?();

            if (entityId != 0)
            {
                entityIdOption = new EntityId(entityId);
            }

            translation.CreateEntityRequests.Add(new CreateEntityRequest
            {
                Entity         = entity,
                EntityId       = entityIdOption,
                TimeoutMillis  = timeoutMillis,
                SenderEntityId = EntityId
            });
        }