Package mindustry.entities.units
Class WeaponMount
java.lang.Object
mindustry.entities.units.WeaponMount
- Direct Known Subclasses:
RepairBeamWeapon.HealBeamMount
-
Field Summary
Modifier and TypeFieldDescriptionfloat
aiming position in world coordinatesfloat
aiming position in world coordinatesint
counter for which barrel bullets have been fired from; used for alternating patternsmindustry.gen.Bullet
current bullet for continuous weaponsfloat
counts up to 1 when charging, 0 when notboolean
is the weapon actively chargingfloat
current heat, 0 to 1float
weapon recoilfloat[]
weapon barrel recoilfloat
reload in frames; 0 means ready to firefloat
retarget counterboolean
whether to rotate to face the target right nowfloat
rotation relative to the unit this mount is onboolean
whether to shoot right nowboolean
extra state for alternating weaponsfloat
lerps to reload timesound loop for continuous weaponsmindustry.gen.Teamc
current target; used for autonomous weapons and AIfloat
destination rotation; do not modify!int
total bullets fired from this mountfloat
lerps to 1 when shooting, 0 when notfinal Weapon
weapon associated with this mount -
Constructor Summary
-
Method Summary
-
Field Details
-
weapon
weapon associated with this mount -
reload
public float reloadreload in frames; 0 means ready to fire -
rotation
public float rotationrotation relative to the unit this mount is on -
recoil
public float recoilweapon recoil -
recoils
weapon barrel recoil -
targetRotation
public float targetRotationdestination rotation; do not modify! -
heat
public float heatcurrent heat, 0 to 1 -
warmup
public float warmuplerps to 1 when shooting, 0 when not -
charging
public boolean chargingis the weapon actively charging -
charge
public float chargecounts up to 1 when charging, 0 when not -
smoothReload
public float smoothReloadlerps to reload time -
aimX
public float aimXaiming position in world coordinates -
aimY
public float aimYaiming position in world coordinates -
shoot
public boolean shootwhether to shoot right now -
rotate
public boolean rotatewhether to rotate to face the target right now -
side
public boolean sideextra state for alternating weapons -
totalShots
public int totalShotstotal bullets fired from this mount -
barrelCounter
public int barrelCountercounter for which barrel bullets have been fired from; used for alternating patterns -
bullet
current bullet for continuous weapons -
sound
sound loop for continuous weapons -
target
current target; used for autonomous weapons and AI -
retarget
public float retargetretarget counter
-
-
Constructor Details
-
WeaponMount
-