/// <inheritdoc /> public void AddEntity(AddEntityPipelineOp addEntityOp) { if (spawnLimiter.CanSpawnEntity() && !IsEntityQueued(addEntityOp.EntityId)) { NextEntityBlock.AddEntity(addEntityOp); spawnLimiter.EntityAdded(addEntityOp.EntityId); } else { Queue <IEntityPipelineOp> queue; if (!entityActions.TryGetValue(addEntityOp.EntityId, out queue)) { queue = entityActions[addEntityOp.EntityId] = new Queue <IEntityPipelineOp>(); workerMetrics.IncrementGauge(QueueSizeMetricName); entitiesToAdd.Enqueue(addEntityOp.EntityId); } queue.Enqueue(addEntityOp); } }
/// <inheritdoc /> public virtual void AddEntity(AddEntityPipelineOp addEntity) { NextEntityBlock.AddEntity(addEntity); }