WIP 3rd core unit

This commit is contained in:
Anuken
2022-02-07 16:46:30 -05:00
parent c5bffd887e
commit 8fb37c1c0a
5 changed files with 39 additions and 51 deletions

View File

@@ -16,6 +16,7 @@ import static mindustry.Vars.*;
public class BaseShield extends Block{
//TODO game rule? or field? should vary by base.
public float radius = 200f;
public int sides = 24;
protected static BaseShieldBuild paramBuild;
//protected static Effect paramEffect;
@@ -119,7 +120,7 @@ public class BaseShield extends Block{
Draw.color(team.color, Color.white, Mathf.clamp(hit));
if(renderer.animateShields){
Fill.circle(x, y, radius);
Fill.poly(x, y, sides, radius);
}else{
Lines.stroke(1.5f);
Draw.alpha(0.09f + Mathf.clamp(0.08f * hit));

View File

@@ -284,7 +284,7 @@ public class UnitAssembler extends PayloadBlock{
units.removeAll(u -> !u.isAdded() || u.dead || !(u.controller() instanceof AssemblerAI));
powerWarmup = Mathf.lerpDelta(powerWarmup, efficiency(), 0.1f);
powerWarmup = Mathf.lerpDelta(powerWarmup, efficiency() > 0.0001f ? 1f : 0f, 0.1f);
droneWarmup = Mathf.lerpDelta(droneWarmup, units.size < dronesCreated ? efficiency() : 0f, 0.1f);
totalDroneProgress += droneWarmup * Time.delta;