package Ragedemo01;
import processing.core.*;

/**
 * A class for easy usage of RageFlowers class.
 * Instantiates a bunch of RageFlowers that are managed through this RageFlorist class.
 * 
 * 
 * TODO for next versions
 * ----------------------
 *   - no hard-coded screen size (1280 x 720)
 * 
 * 
 * @version 003
 * @author RageManifesto
 *
 */
public class RageFlorist extends RageAbstractEffect{
	
	private PApplet parent;
    private RageFlowers[] items;
	
	
	/**
	 * Initializes the RageFlorist
	 * @param p reference to the main program with a screen to draw to
	 * @param amount of flowers
	 * @param seed random seed for flowers
	 */
	public RageFlorist(PApplet p, int amount) {
		this.parent = p;
		
		this.items = new RageFlowers[amount];
		for ( int i = 0; i < amount; i++ ) {
			
			items[i] = new RageFlowers(
					parent,
					(int)parent.random(100f, 1180f),
					(int)parent.random(-200f, -1000f),
					(int)parent.random(-3.8f, 3.8f),
					
					(int)parent.random(1f, 8f),
					parent.random(-10f, -60f),
					parent.random(-0.05f, 0.05f),
					(int)parent.random(14f, 22f),
					
					(int) parent.random(6f, 15f),
					parent.random(0.3f, 1.0f),
					parent.random(0.5f, 2.2f),
					parent.random(0.05f, 0.25f),
					
					255,
					(int)parent.random(11f, 18f),
					(int)parent.random(15f, 50f)
					);	
			
			/*
	    this.flowers1 = new RageFlowers(this, 200, -280, 0, 1, -50f, -0.08f, 16, 16, 1f, 27f, 0.3f, 255, 5, 50);
        this.flowers2 = new RageFlowers(this, 400, -90, 1, 1, -15f, -0.03f, 8, 8, 1.5f, 30f, 0.5f, 255, 10, 25); 
        this.flowers3 = new RageFlowers(this, 600, -50, 0, 1, -10f, 0f, 12, 6, 0.7f, 30f, 0.3f, 255, 10, 32);
        this.flowers4 = new RageFlowers(this, 800, -60, -1, 1, -11f, -0.06f, 12, 6, 12f, 1f, 0.5f, 255, 5, 25);
        this.flowers5 = new RageFlowers(this, 0, -70, 0, 1, -12f, 0.2f, 16, 9, 1f, 12f, 0.4f, 255, 15, 15);
        this.flowers6 = new RageFlowers(this, 1000, -170, 2, 1, -15f, 0f, 18, 10, 1f, 15f, 0.3f, 255, 10, 38);
        this.flowers7 = new RageFlowers(this, 350, -70, -2, 1, -16f, 0.1f, 20, 15, 1.2f, 25f, 0.2f, 255, 12, 30);
        this.flowers8 = new RageFlowers(this, 400, -120, 1, 1, -17f, -0.3f, 16, 3, 1f, 30f, 0.7f, 255, 4, 60);
        this.flowers9 = new RageFlowers(this, 0, -400, 1, 1, -18f, 0f, 18, 9, 1f, 25f, 0.6f, 255, 8, 25);
        this.flowers10 = new RageFlowers(this, 200, -550, 0, 2, -19f, 0f, 12, 8, 1f, 20f, 0.5f, 255, 10, 45);
			 */
			
			
			
		}
		
	}




	@Override
	public void draw() {
		
		for ( int i = 0; i < items.length; i++ ) {
			
			items[i].draw();
		}
		
	}

}
