package waterfall;

import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.utils.Array;


public class WaterfallController
{
    private Array<Waterfall> waterfalls;

    public WaterfallController()
    {
        waterfalls = new Array<Waterfall>();
    }

    public void addWaterfall(Waterfall waterfall)
    {
        waterfalls.add(waterfall);
    }

    public void drawWaterfall(SpriteBatch batch)
    {
        for (Waterfall w : waterfalls)
        {
            batch.draw(w, w.getX(), w.getY());
        }
    }

    public void drawWaterfallAnimation(SpriteBatch batch)
    {
        for (Waterfall w : waterfalls)
        {
            w.drawWaterfallAnimation(batch);
        }
    }

    public void removeWaterfall()
    {
        waterfalls.clear();
    }
}
