Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package de.cryptonicdev.cryptonic.particle;
- import java.util.ArrayList;
- import java.util.Random;
- import java.util.Timer;
- import org.lwjgl.input.Mouse;
- import org.lwjgl.opengl.GL11;
- import de.cryptonicdev.cryptonic.utils.RenderUtils;
- import net.minecraft.util.MathHelper;
- public class ParticleGenerator {
- public static int anzahl;
- public static int breite;
- public static int höhe;
- public ArrayList<Particle> particles = new ArrayList();
- private Random random = new Random();
- private Timer timer = new Timer();
- public ParticleGenerator(int anzahl, int breite, int höhe) {
- this.anzahl = anzahl;
- this.breite = breite;
- this.höhe = höhe;
- for (int i = 0; i < anzahl; i++) {
- this.particles.add(new Particle(this.random.nextInt(breite), this.random.nextInt(höhe), RenderUtils.rainbow(i * 1000)));
- }
- }
- public void drawParticles() {
- for (Particle p : this.particles)
- {
- p.draw();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement