@Override
	public void setup() {
		if(!finished){
			entitiesarray = new entity[particles];
			//filling the array with particle entities
			for(int i = 0; i<particles; i++){
				//creating the particle
				particle tempent = new particle(maingame.mainscreen, x, y, getparticlecol());
				//setting up size and direction
				int size = getparticlesize();
				tempent.setboundsx(size);
				tempent.setboundsy(size);
				tempent.setaccely(gravity);
				int maxforce = (Math.abs(random.nextInt())%force) + 1;
				int powerx = random.nextInt()%maxforce;
				if(maxforce !=0 && random.nextBoolean())powerx++;
				int powery = (int) Math.sqrt(Math.pow(maxforce, 2) - Math.pow(powerx, 2));
				if(random.nextBoolean())powery *= -1;
				tempent.setdirx(powerx);
				tempent.setdiry(powery);
				//adding it to the entities array that belongs to this peffect
				entitiesarray[i] = tempent;
			}
			
			//everything has been set up, now we will run the thread that moves the particles
			Thread t = new Thread(this);
			t.start();
		}
	}