Illuminator tweaks
This commit is contained in:
@@ -2,6 +2,7 @@ package mindustry.world.blocks.power;
|
||||
|
||||
import arc.graphics.*;
|
||||
import arc.graphics.g2d.*;
|
||||
import arc.math.*;
|
||||
import arc.scene.ui.layout.*;
|
||||
import arc.util.*;
|
||||
import arc.util.io.*;
|
||||
@@ -29,6 +30,7 @@ public class LightBlock extends Block{
|
||||
|
||||
public class LightEntity extends Building{
|
||||
public int color = Pal.accent.rgba();
|
||||
public float smoothTime = 1f;
|
||||
|
||||
@Override
|
||||
public void draw(){
|
||||
@@ -40,6 +42,11 @@ public class LightBlock extends Block{
|
||||
Draw.blend();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTile(){
|
||||
smoothTime = Mathf.lerpDelta(smoothTime, timeScale, 0.1f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildConfiguration(Table table){
|
||||
table.button(Icon.pencil, () -> {
|
||||
@@ -50,7 +57,7 @@ public class LightBlock extends Block{
|
||||
|
||||
@Override
|
||||
public void drawLight(){
|
||||
Drawf.light(team, x, y, radius, Tmp.c1.set(color), brightness * efficiency());
|
||||
Drawf.light(team, x, y, radius * Math.min(smoothTime, 2f), Tmp.c1.set(color), brightness * efficiency());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user