From b05f867800d3d2283dbdd896c72ea3d68ee0d3f0 Mon Sep 17 00:00:00 2001 From: QmelZ <59574967+QmelZ@users.noreply.github.com> Date: Tue, 2 Feb 2021 21:14:47 +0300 Subject: [PATCH] add rotation to ParticleEffect (#4501) * add rotation to ParticleEffect * add offset --- core/src/mindustry/entities/effect/ParticleEffect.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/mindustry/entities/effect/ParticleEffect.java b/core/src/mindustry/entities/effect/ParticleEffect.java index f38fc00603..281410ada3 100644 --- a/core/src/mindustry/entities/effect/ParticleEffect.java +++ b/core/src/mindustry/entities/effect/ParticleEffect.java @@ -16,6 +16,7 @@ public class ParticleEffect extends Effect{ //region only public float sizeFrom = 2f, sizeTo = 0f; + public float offset = 0; public String region = "circle"; //line only @@ -48,7 +49,7 @@ public class ParticleEffect extends Effect{ }); }else{ Angles.randLenVectors(e.id, particles, length * fin + baseLength, e.rotation, cone, (x, y) -> { - Draw.rect(tex, e.x + x, e.y + y, rad, rad); + Draw.rect(tex, e.x + x, e.y + y, rad, rad, e.rotation + offset); }); } }