T5 air support unit

This commit is contained in:
Anuken
2020-09-21 11:41:11 -04:00
parent 63e35bd462
commit 1aa8bb9dd2
29 changed files with 8055 additions and 7843 deletions

View File

@@ -21,8 +21,8 @@ public class ForceFieldAbility extends Ability{
/** Cooldown after the shield is broken, in ticks. */
public float cooldown = 60f * 5;
/** State: radius scaling. */
protected float radiusScale;
/** State. */
protected float radiusScale, alpha;
private static float realRad;
private static Unit paramUnit;
@@ -40,7 +40,7 @@ public class ForceFieldAbility extends Ability{
}
paramUnit.shield -= trait.damage();
paramUnit.shieldAlpha = 1f;
paramField.alpha = 1f;
}
};
@@ -59,6 +59,8 @@ public class ForceFieldAbility extends Ability{
unit.shield += Time.delta * regen;
}
alpha = Math.max(alpha - Time.delta/10f, 0f);
if(unit.shield > 0){
radiusScale = Mathf.lerpDelta(radiusScale, 1f, 0.06f);
paramUnit = unit;
@@ -78,7 +80,7 @@ public class ForceFieldAbility extends Ability{
if(unit.shield > 0){
Draw.z(Layer.shields);
Draw.color(unit.team.color, Color.white, Mathf.clamp(unit.shieldAlpha));
Draw.color(unit.team.color, Color.white, Mathf.clamp(alpha));
if(Core.settings.getBool("animatedshields")){
Fill.poly(unit.x, unit.y, 6, realRad);

View File

@@ -8,7 +8,7 @@ import mindustry.gen.*;
public class HealFieldAbility extends Ability{
public float amount = 1, reload = 100, range = 60;
public Effect healEffect = Fx.heal;
public Effect activeEffect = Fx.healWave;
public Effect activeEffect = Fx.healWaveDynamic;
protected float timer;
protected boolean wasHealed = false;
@@ -37,7 +37,7 @@ public class HealFieldAbility extends Ability{
});
if(wasHealed){
activeEffect.at(unit);
activeEffect.at(unit, range);
}
timer = 0f;