/// <inheritdoc />
        public void UpdateComponent(UpdateComponentPipelineOp updateComponentOp)
        {
            var entityId = updateComponentOp.EntityId;

            if (IsEntityQueued(entityId))
            {
                entityActions[entityId].Enqueue(updateComponentOp);
            }
            else
            {
                NextEntityBlock.UpdateComponent(updateComponentOp);
            }
        }
        /// <inheritdoc />
        public override void UpdateComponent(UpdateComponentPipelineOp updateComponentOp)
        {
            var entityId = updateComponentOp.EntityId;

            if (!universe.ContainsEntity(entityId))
            {
                Debug.LogError("EntityComponentUpdater::UpdateComponent: Entity not present: " + entityId);
                return;
            }

            var entity = universe.Get(entityId);

            entity.OnComponentUpdatePipelineOp(updateComponentOp);
            NextEntityBlock.UpdateComponent(updateComponentOp);
        }
        /// <inheritdoc />
        public void UpdateComponent(UpdateComponentPipelineOp updateComponentOp)
        {
            if (!IsEntityTracked(updateComponentOp.EntityId))
            {
                Debug.LogErrorFormat("Entity not found: OnComponentUpdate({0}, {1}).",
                                     updateComponentOp.EntityId, updateComponentOp.ComponentMetaClass);
                return;
            }

            if (universe.ContainsEntity(updateComponentOp.EntityId))
            {
                NextEntityBlock.UpdateComponent(updateComponentOp);
                return;
            }

            if (entitiesToSpawn.ContainsKey(updateComponentOp.EntityId))
            {
                entitiesToSpawn[updateComponentOp.EntityId].StalledOps.Enqueue(updateComponentOp);
            }
        }
Пример #4
0
 /// <inheritdoc />
 public void UpdateComponent(UpdateComponentPipelineOp updateComponentOp)
 {
     StallForCriticalSection(updateComponentOp);
 }