This commit is contained in:
Anuken
2020-12-18 13:21:51 -05:00
parent 5de2c0c512
commit b0bf80d8b7
2 changed files with 5 additions and 7 deletions

View File

@@ -158,16 +158,14 @@ public class PowerNode extends PowerBlock{
}
protected void setupColor(float satisfaction){
float fract = 1f - satisfaction;
Draw.color(laserColor1, laserColor2, fract * 0.86f + Mathf.absin(3f, 0.1f));
Draw.color(laserColor1, laserColor2, (1f - satisfaction) * 0.86f + Mathf.absin(3f, 0.1f));
Draw.alpha(renderer == null ? 0.5f : renderer.laserOpacity);
}
protected void drawLaser(Team team, float x1, float y1, float x2, float y2, int size1, int size2){
float angle1 = Angles.angle(x1, y1, x2, y2);
float vx = Mathf.cosDeg(angle1), vy = Mathf.sinDeg(angle1);
float len1 = size1 * tilesize / 2f - 1.5f, len2 = size2 * tilesize / 2f - 1.5f;
float angle1 = Angles.angle(x1, y1, x2, y2),
vx = Mathf.cosDeg(angle1), vy = Mathf.sinDeg(angle1),
len1 = size1 * tilesize / 2f - 1.5f, len2 = size2 * tilesize / 2f - 1.5f;
Drawf.laser(team, laser, laserEnd, x1 + vx*len1, y1 + vy*len1, x2 - vx*len2, y2 - vy*len2, 0.25f);
}