Allow heat region to produce light (#6879)

* Allow heat region to produce light

* Method overload for backwards compatability
This commit is contained in:
MEEPofFaith
2022-11-06 11:28:59 -08:00
committed by GitHub
parent 83be0116c6
commit 810a905af3
3 changed files with 21 additions and 4 deletions

View File

@@ -42,15 +42,22 @@ public class LightRenderer{
circleIndex ++;
}
public void add(float x, float y, TextureRegion region, Color color, float opacity){
add(x, y, region, 0f, color, opacity);
}
public void add(float x, float y, TextureRegion region, float rotation, Color color, float opacity){
if(!enabled()) return;
float res = color.toFloatBits();
float xscl = Draw.xscl, yscl = Draw.yscl;
add(() -> {
Draw.color(res);
Draw.alpha(opacity);
Draw.rect(region, x, y);
Draw.scl(xscl, yscl);
Draw.rect(region, x, y, rotation);
Draw.scl();
});
}