134 public ParticleData
addParticle(
float baseSize,
float durIn,
float durOut,
float endSizeMult,
float maxDriftVel,
float maxAngVel, Color color) {
135 ParticleData p =
new ParticleData(baseSize, durIn, durOut, endSizeMult, maxDriftVel, maxAngVel, color,
spriteSheetKey);
188 public void render(CombatEngineLayers layer, ViewportAPI viewport, DamagingProjectileAPI proj) {
189 float x = entity.getLocation().x;
190 float y = entity.getLocation().y;
192 float b = viewport.getAlphaMult();
200 float size = p.baseSize * p.scale;
202 Vector2f offset = p.offset;
205 diff = Misc.getAngleDiff(
baseFacing, proj.getFacing());
206 if (Math.abs(diff) > 0.1f) {
207 offset = Misc.rotateAroundOrigin(offset, diff);
210 Vector2f loc =
new Vector2f(x + offset.x, y + offset.y);
214 p.sprite.setAngle(p.angle);
215 p.sprite.setSize(size, size);
216 p.sprite.setAlphaMult(b * alphaMult * p.fader.getBrightness());
217 p.sprite.setColor(p.color);
218 p.sprite.renderAtCenter(loc.x, loc.y);
221 GL14.glBlendEquation(GL14.GL_FUNC_REVERSE_SUBTRACT);
225 float size = p.baseSize * p.scale;
227 Vector2f offset = p.offset;
230 diff = Misc.getAngleDiff(
baseFacing, proj.getFacing());
231 if (Math.abs(diff) > 0.1f) {
232 offset = Misc.rotateAroundOrigin(offset, diff);
235 Vector2f loc =
new Vector2f(x + offset.x, y + offset.y);
239 p.sprite.setAngle(p.angle);
240 p.sprite.setSize(size, size);
241 p.sprite.setAlphaMult(b * alphaMult * p.fader.getBrightness());
242 p.sprite.setColor(p.color);
243 p.sprite.renderAtCenter(loc.x, loc.y);
246 GL14.glBlendEquation(GL14.GL_FUNC_ADD);