More lights
This commit is contained in:
@@ -20,15 +20,19 @@ public class LightRenderer{
|
||||
}
|
||||
|
||||
public void add(float x, float y, float radius, Color color, float opacity){
|
||||
float res = color.toFloatBits();
|
||||
add(() -> {
|
||||
Draw.color(color, opacity);
|
||||
Draw.color(res);
|
||||
Draw.alpha(opacity);
|
||||
Draw.rect("circle-shadow", x, y, radius * 2, radius * 2);
|
||||
});
|
||||
}
|
||||
|
||||
public void add(float x, float y, TextureRegion region, Color color, float opacity){
|
||||
float res = color.toFloatBits();
|
||||
add(() -> {
|
||||
Draw.color(color, opacity);
|
||||
Draw.color(res);
|
||||
Draw.alpha(opacity);
|
||||
Draw.rect(region, x, y);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public class OverlayRenderer{
|
||||
if(!rect.setSize(Core.camera.width * 0.9f, Core.camera.height * 0.9f)
|
||||
.setCenter(Core.camera.position.x, Core.camera.position.y).contains(mechpad.x, mechpad.y)){
|
||||
|
||||
Tmp.v1.set(mechpad.worldx(), mechpad.worldy()).sub(Core.camera.position.x, Core.camera.position.y).setLength(indicatorLength);
|
||||
Tmp.v1.set(mechpad.drawx(), mechpad.drawy()).sub(Core.camera.position.x, Core.camera.position.y).setLength(indicatorLength);
|
||||
|
||||
Lines.stroke(2f, ((MechPad) mechpad.block()).mech.engineColor);
|
||||
Lines.lineAngle(Core.camera.position.x + Tmp.v1.x, Core.camera.position.y + Tmp.v1.y, Tmp.v1.angle(), 0.5f);
|
||||
|
||||
Reference in New Issue
Block a user