package Ragedemo01;



import processing.core.*;

import java.util.*;

public class RageBoxesTester extends PApplet {

	RageBoxes myBoxEffect1;
	RageBoxes myBoxEffect2;
	RageBoxes myBoxEffect3;
	RageBoxes myBoxEffect4;
	boolean a;


    public void setup() {
        size(1280, 720, P3D);
        background(0);
        frameRate(30);
        this.myBoxEffect1 = new RageBoxes(this, 500, -10.0f, true, false, true, 255, new int[]{180,40,200});
        this.myBoxEffect2 = new RageBoxes(this, 750, -10.0f, true, false, true, 255, new int[]{255,255,255});
        this.myBoxEffect3 = new RageBoxes(this, 1000, -1000.0f, true, true, true, 255, new int[]{0,0,0});
        this.myBoxEffect4 = new RageBoxes(this);
        this.a = false;
     
        
        //public RageBoxes(PApplet p, int itemAmount, float distance, boolean isLooping, boolean isFilled, boolean isStroke, int alpha){
        
    }
    

    
    public void draw() {
    	
        if (millis() < 10000) {
        	background(255, 165, 0);
        	myBoxEffect1.draw();
        }
        else if (millis() < 20000) {
        	if (this.a == false){
        		myBoxEffect1.reset(1000, -1000.0f, true, true, true, 255, new int[]{0,0,0});
        		this.a = true;
        	}
        	background(0, 0, 80);
        	myBoxEffect4.draw();

        }
        else if ( millis() < 30000 ) {
        	background(80, 255, 200);
        	myBoxEffect1.draw();
        }

    }
    
    
    public static void main(String[] args) {
    	
    	PApplet.main(new String[] { "--present", "RageBoxesTester" });

	}
	
}