ParticleEffect line cap option (#7392)
This commit is contained in:
@@ -44,6 +44,7 @@ public class ParticleEffect extends Effect{
|
|||||||
//line only
|
//line only
|
||||||
public boolean line;
|
public boolean line;
|
||||||
public float strokeFrom = 2f, strokeTo = 0f, lenFrom = 4f, lenTo = 2f;
|
public float strokeFrom = 2f, strokeTo = 0f, lenFrom = 4f, lenTo = 2f;
|
||||||
|
public boolean cap = true;
|
||||||
|
|
||||||
private @Nullable TextureRegion tex;
|
private @Nullable TextureRegion tex;
|
||||||
|
|
||||||
@@ -77,7 +78,7 @@ public class ParticleEffect extends Effect{
|
|||||||
rv.trns(realRotation + rand.range(cone), !randLength ? l : rand.random(l));
|
rv.trns(realRotation + rand.range(cone), !randLength ? l : rand.random(l));
|
||||||
float x = rv.x, y = rv.y;
|
float x = rv.x, y = rv.y;
|
||||||
|
|
||||||
Lines.lineAngle(ox + x, oy + y, Mathf.angle(x, y), len);
|
Lines.lineAngle(ox + x, oy + y, Mathf.angle(x, y), len, cap);
|
||||||
Drawf.light(ox + x, oy + y, len * lightScl, lightColor, lightOpacity * Draw.getColor().a);
|
Drawf.light(ox + x, oy + y, len * lightScl, lightColor, lightOpacity * Draw.getColor().a);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in New Issue
Block a user