Package mindustry.entities.abilities
Class ForceFieldAbility
java.lang.Object
mindustry.entities.abilities.Ability
mindustry.entities.abilities.ForceFieldAbility
- All Implemented Interfaces:
Cloneable
-
Field Summary
FieldsModifier 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.protected boolean
Fields inherited from class mindustry.entities.abilities.Ability
data, descriptionWidth, display
-
Constructor Summary
ConstructorsConstructorDescriptionForceFieldAbility
(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
addStats
(arc.scene.ui.layout.Table t) void
checkRadius
(mindustry.gen.Unit unit) void
created
(mindustry.gen.Unit unit) void
death
(mindustry.gen.Unit unit) void
displayBars
(mindustry.gen.Unit unit, arc.scene.ui.layout.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. -
wasBroken
protected boolean wasBroken
-
-
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
public void addStats(arc.scene.ui.layout.Table t) -
update
public void update(mindustry.gen.Unit unit) -
death
public void death(mindustry.gen.Unit unit) -
draw
public void draw(mindustry.gen.Unit unit) -
displayBars
public void displayBars(mindustry.gen.Unit unit, arc.scene.ui.layout.Table bars) - Overrides:
displayBars
in classAbility
-
created
public void created(mindustry.gen.Unit unit) -
checkRadius
public void checkRadius(mindustry.gen.Unit unit)
-