Definition at line 5 of file AutofireAIPlugin.java.
◆ advance()
void com.fs.starfarer.api.combat.AutofireAIPlugin.advance |
( |
float |
amount | ) |
|
Only called when the group is on autofire.
Should generally make the decision on what to fire at and whether to fire here, and then return the result of that decision in shouldFire().
- Parameters
-
amount | seconds since last frame. |
◆ forceOff()
void com.fs.starfarer.api.combat.AutofireAIPlugin.forceOff |
( |
| ) |
|
Tells the weapon AI to reconsider whether it should be firing, before it decides it should fire again.
Called when a group is toggled on/off.
◆ getTarget()
Vector2f com.fs.starfarer.api.combat.AutofireAIPlugin.getTarget |
( |
| ) |
|
- Returns
- location to aim at, with target leading if applicable. Can be null if the weapon has no target/isn't trying to aim anywhere.
◆ getTargetMissile()
MissileAPI com.fs.starfarer.api.combat.AutofireAIPlugin.getTargetMissile |
( |
| ) |
|
◆ getTargetShip()
ShipAPI com.fs.starfarer.api.combat.AutofireAIPlugin.getTargetShip |
( |
| ) |
|
- Returns
- current target, if it's a ship. null otherwise.
◆ getWeapon()
WeaponAPI com.fs.starfarer.api.combat.AutofireAIPlugin.getWeapon |
( |
| ) |
|
- Returns
- the weapon that this AI is controlling. That means the plugin should hold on to it when it's passed in in ModPlugin.pickWeaponAutofireAI().
◆ shouldFire()
boolean com.fs.starfarer.api.combat.AutofireAIPlugin.shouldFire |
( |
| ) |
|
Only called when the group is on autofire.
- Returns
- whether the weapon should fire now.
The documentation for this interface was generated from the following file: