Added lights for laser turret projectiles

This commit is contained in:
Anuken
2020-04-24 09:50:40 -04:00
parent eeb88df5f6
commit 018fe5dea2
6 changed files with 24 additions and 3 deletions

View File

@@ -9,6 +9,8 @@ import mindustry.entities.*;
import mindustry.gen.*;
import mindustry.graphics.*;
import static mindustry.Vars.renderer;
public class LaserBulletType extends BulletType{
protected Color[] colors = {Pal.lancerLaser.cpy().mul(1f, 1f, 1f, 0.4f), Pal.lancerLaser, Color.white};
protected float length = 160f;
@@ -69,5 +71,8 @@ public class LaserBulletType extends BulletType{
}
Lines.precise(false);
Draw.reset();
Tmp.v1.trns(b.rotation(), baseLen * 1.1f);
renderer.lights.line(b.x(), b.y(), b.x() + Tmp.v1.x, b.y() + Tmp.v1.y, width * 1.4f * b.fout(), colors[0], 0.6f);
}
}