public class DEMScript extends BaseEveryFrameCombatPlugin implements MissileAIPlugin
| Modifier and Type | Class and Description |
|---|---|
static class |
DEMScript.ShapedExplosionParams |
static class |
DEMScript.State |
| Modifier and Type | Field and Description |
|---|---|
protected float |
allowedDriftFraction |
protected boolean |
bombPumped |
protected ShipAPI |
demDrone |
protected java.awt.Color |
destroyedExplosionColor |
protected boolean |
destroyMissleWhenDoneFiring |
protected float |
elapsedFiring |
protected float |
elapsedTargeting |
protected float |
elapsedWaiting |
protected boolean |
exploded |
protected int |
explosionDelayFrames |
protected boolean |
fadeOutEngineWhenFiring |
protected CombatEntityAPI |
fireTarget |
protected float |
firingTime |
protected float |
minDelayBeforeTriggering |
protected MissileAPI |
missile |
protected DEMScript.ShapedExplosionParams |
p |
protected boolean |
payloadCenterSweepOnOriginalOffset |
protected java.util.List<org.lwjgl.util.vector.Vector2f> |
payloadSweepAngles |
protected java.util.List<java.lang.Float> |
payloadSweepPhaseShift |
protected float |
payloadSweepRateMult |
protected java.lang.String |
payloadWeaponId |
protected float |
preferredMaxFireDistance |
protected float |
preferredMinFireDistance |
protected boolean |
randomPayloadSweepPhaseShift |
protected boolean |
randomStrafe |
protected ShipAPI |
ship |
protected boolean |
snapFacingToTargetIfCloseEnough |
protected DEMScript.State |
state |
protected float |
strafeDir |
protected float |
strafeDur |
protected float |
targetingLaserArc |
protected java.util.List<org.lwjgl.util.vector.Vector2f> |
targetingLaserFireOffset |
protected java.lang.String |
targetingLaserId |
protected float |
targetingLaserRange |
protected java.util.List<org.lwjgl.util.vector.Vector2f> |
targetingLaserSweepAngles |
protected float |
targetingTime |
protected float |
triggerAngle |
protected float |
triggerDistance |
protected float |
turnRateBoost |
protected float |
turnRateMultOnSignal |
protected boolean |
useTriggerAngle |
protected WeaponAPI |
weapon |
| Constructor and Description |
|---|
DEMScript(MissileAPI missile,
ShipAPI ship,
WeaponAPI weapon) |
| Modifier and Type | Method and Description |
|---|---|
void |
advance(float amount)
The AI should do its main work here.
|
void |
advance(float amount,
java.util.List<InputEventAPI> events) |
protected void |
doMissileControl(float amount) |
static float |
getValue(org.json.JSONObject json,
java.lang.String key,
float defaultValue) |
void |
spawnShapedExplosion(org.lwjgl.util.vector.Vector2f loc,
float angle,
DEMScript.ShapedExplosionParams p) |
protected void |
updateDroneState(float amount) |
init, processInputPreCoreControls, renderInUICoords, renderInWorldCoordsprotected DEMScript.State state
protected MissileAPI missile
protected CombatEntityAPI fireTarget
protected java.util.List<org.lwjgl.util.vector.Vector2f> targetingLaserFireOffset
protected java.util.List<org.lwjgl.util.vector.Vector2f> targetingLaserSweepAngles
protected java.util.List<org.lwjgl.util.vector.Vector2f> payloadSweepAngles
protected java.util.List<java.lang.Float> payloadSweepPhaseShift
protected float minDelayBeforeTriggering
protected boolean useTriggerAngle
protected float triggerAngle
protected float allowedDriftFraction
protected float triggerDistance
protected float turnRateBoost
protected float turnRateMultOnSignal
protected float targetingLaserArc
protected float targetingTime
protected float firingTime
protected java.lang.String targetingLaserId
protected java.lang.String payloadWeaponId
protected float preferredMinFireDistance
protected float preferredMaxFireDistance
protected float targetingLaserRange
protected float payloadSweepRateMult
protected boolean bombPumped
protected boolean fadeOutEngineWhenFiring
protected boolean destroyMissleWhenDoneFiring
protected boolean randomStrafe
protected boolean randomPayloadSweepPhaseShift
protected boolean payloadCenterSweepOnOriginalOffset
protected boolean snapFacingToTargetIfCloseEnough
protected java.awt.Color destroyedExplosionColor
protected float elapsedWaiting
protected float elapsedTargeting
protected float elapsedFiring
protected int explosionDelayFrames
protected float strafeDur
protected float strafeDir
protected boolean exploded
protected DEMScript.ShapedExplosionParams p
public DEMScript(MissileAPI missile, ShipAPI ship, WeaponAPI weapon)
public static float getValue(org.json.JSONObject json, java.lang.String key, float defaultValue)
public void advance(float amount, java.util.List<InputEventAPI> events)
advance in interface EveryFrameCombatPluginadvance in class BaseEveryFrameCombatPluginprotected void updateDroneState(float amount)
protected void doMissileControl(float amount)
public void advance(float amount)
MissileAIPluginadvance in interface MissileAIPluginpublic void spawnShapedExplosion(org.lwjgl.util.vector.Vector2f loc, float angle, DEMScript.ShapedExplosionParams p)