From fc91b6b135c54851245d01e52a9283b32b732cfa Mon Sep 17 00:00:00 2001 From: MEEP of Faith <54301439+MEEPofFaith@users.noreply.github.com> Date: Sat, 23 Jan 2021 12:29:36 -0800 Subject: [PATCH] Colored construct (#4417) --- core/src/mindustry/graphics/Drawf.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/graphics/Drawf.java b/core/src/mindustry/graphics/Drawf.java index 83d9065281..e38fa74c82 100644 --- a/core/src/mindustry/graphics/Drawf.java +++ b/core/src/mindustry/graphics/Drawf.java @@ -221,9 +221,13 @@ public class Drawf{ } public static void construct(float x, float y, TextureRegion region, float rotation, float progress, float speed, float time){ + construct(x, y, region, Pal.accent, rotation, progress, speed, time); + } + + public static void construct(float x, float y, TextureRegion region, Color color, float rotation, float progress, float speed, float time){ Shaders.build.region = region; Shaders.build.progress = progress; - Shaders.build.color.set(Pal.accent); + Shaders.build.color.set(color); Shaders.build.color.a = speed; Shaders.build.time = -time / 20f; @@ -235,9 +239,13 @@ public class Drawf{ } public static void construct(Building t, TextureRegion region, float rotation, float progress, float speed, float time){ + construct(t, region, Pal.accent, rotation, progress, speed, time); + } + + public static void construct(Building t, TextureRegion region, Color color, float rotation, float progress, float speed, float time){ Shaders.build.region = region; Shaders.build.progress = progress; - Shaders.build.color.set(Pal.accent); + Shaders.build.color.set(color); Shaders.build.color.a = speed; Shaders.build.time = -time / 20f;