//package tarea_3;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.util.*;
import javax.swing.*;

public class PlantView extends JComponent {
	public PlantView() {
		equipmentList = new ArrayList<Equipment>();
	}
	public void addEquipment(Equipment t){
		equipmentList.add(t);
	}
	public void paintComponent(Graphics g){ 
		super.paintComponent(g);
		Graphics2D g2d=(Graphics2D) g;
		for (int i=0; i< equipmentList.size(); i++){
			equipmentList.get(i).paint(g2d);
		}
	}
	public void timeTick(float dt){
		for (int i=0; i< equipmentList.size(); i++){
			equipmentList.get(i).timeTick(dt);
		}
	}

	private ArrayList<Equipment> equipmentList;

}
