Skip to content

Instantly share code, notes, and snippets.

@FelixZhang00
Created May 19, 2015 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FelixZhang00/353d9d25a853341d6623 to your computer and use it in GitHub Desktop.
Save FelixZhang00/353d9d25a853341d6623 to your computer and use it in GitHub Desktop.
ParticlesShooter
package me.felixzhang.example.my_particles2.objects;
import static me.felixzhang.example.my_particles2.util.Geometry.Vector;
import static me.felixzhang.example.my_particles2.util.Geometry.Point;
/**
* Created by felix on 15/5/19.
*/
public class ParticlesShooter {
//确定粒子发射器的位置,方向和颜色
private final Point position;
private final Vector direction;
private final int color;
public ParticlesShooter(Point position, Vector direction, int color) {
this.position = position;
this.direction = direction;
this.color = color;
}
public void addParticles(ParticlsSystem particlsSystem, float currentTime, int count) {
for (int i = 0; i < count; i++) {
particlsSystem.addParticles(position,color,direction,currentTime);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment