Package mindustry.entities.abilities
Class ForceFieldAbility
java.lang.Object
mindustry.entities.abilities.Ability
mindustry.entities.abilities.ForceFieldAbility
- All Implemented Interfaces:
Cloneable
-
Field Summary
Modifier and TypeFieldDescriptionprotected float
State.float
Cooldown after the shield is broken, in ticks.float
Maximum shield.float
Shield radius.protected float
State.float
Shield regen speed in damage/tick.float
Rotation of shield.int
Sides of shield polygon. -
Constructor Summary
ConstructorDescriptionForceFieldAbility
(float radius, float regen, float max, float cooldown) ForceFieldAbility
(float radius, float regen, float max, float cooldown, int sides, float rotation) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
checkRadius
(mindustry.gen.Unit unit) void
displayBars
(mindustry.gen.Unit unit, Table bars) void
draw
(mindustry.gen.Unit unit) void
update
(mindustry.gen.Unit unit)
-
Field Details
-
radius
public float radiusShield radius. -
regen
public float regenShield regen speed in damage/tick. -
max
public float maxMaximum shield. -
cooldown
public float cooldownCooldown after the shield is broken, in ticks. -
sides
public int sidesSides of shield polygon. -
rotation
public float rotationRotation of shield. -
radiusScale
protected float radiusScaleState. -
alpha
protected float alphaState.
-
-
Constructor Details
-
ForceFieldAbility
public ForceFieldAbility(float radius, float regen, float max, float cooldown) -
ForceFieldAbility
public ForceFieldAbility(float radius, float regen, float max, float cooldown, int sides, float rotation)
-
-
Method Details
-
addStats
-
update
public void update(mindustry.gen.Unit unit) -
draw
public void draw(mindustry.gen.Unit unit) -
displayBars
- Overrides:
displayBars
in classAbility
-
checkRadius
public void checkRadius(mindustry.gen.Unit unit)
-