import { DustEffect } from './dust.js';
import { FliesEffect } from './flies.js';
import { SpiderEffect } from './spider.js';

export class EffectsManager {
    constructor(scene) {
        this.effects = [];
        this._initializeEffects(scene);
    }

    _initializeEffects(scene) {
        // Add all desired effects here.
        // This is now the single place to manage which effects are active.
        this.addEffect(new DustEffect(scene));
        this.addEffect(new FliesEffect(scene));
        this.addEffect(new SpiderEffect(scene));
    }

    addEffect(effect) {
        this.effects.push(effect);
    }

    update() {
        this.effects.forEach(effect => effect.update());
    }
}