private void AddShieldEffectToLayer(ShieldEntityEffect effect, int layerIndex)
    {
        EnsureEffectsLayerExists(layerIndex);

        List <ShieldEntityEffect> shieldLayerEffects = shieldEffectsInOrbit[layerIndex];

        shieldLayerEffects.Add(effect);
    }
    private void ConsumeEffectsToCreateShield()
    {
        for (int i = 0; i < entitiesPerLayer.Value; i++)
        {
            ShieldEntityEffect effect = shieldEffectsWaitingToGetShield.Dequeue();
            AddShieldEffectToLayer(effect, (int)Shield.CurrentLayers);
        }

        Shield.AddLayer();
    }
    private void SpawnEffectInLayer(int layerIndex)
    {
        for (int i = 0; i < entitiesPerLayer.Value; i++)
        {
            ShieldEntityEffect effectInstance = SpawnEntity();
            effectInstance.transform.position = GetOrbitalPositionBasedOnIndex(layerIndex + 1, i);
            effectInstance.EnterOrbit(this, layerIndex);

            AddShieldEffectToLayer(effectInstance, layerIndex);
        }
    }
    public void ElementWasDestroyed(ShieldEntity entity)
    {
        if (isDestroying)
        {
            return;
        }

        activeShieldEntities.Remove(entity);

        ShieldEntityEffect effect = SpawnEntity();

        effect.transform.position = entity.transform.position;
        effect.EnterOrbit(this, (int)Shield.CurrentLayers);

        shieldEffectsWaitingToGetShield.Enqueue(effect);

        PollCreateShield();
    }
 private void ShieldEffectExitOrbit(ShieldEntityEffect effect)
 {
     effect.ExitOrbit(this, prefabs.Random());
 }