public class SpeedReduction extends java.lang.Object implements EveryFrameScript
| Modifier and Type | Field and Description |
|---|---|
protected float |
durationSeconds |
protected float |
elapsed |
protected float |
speedReductionRate |
protected SectorEntityToken |
target |
| Constructor and Description |
|---|
SpeedReduction(SectorEntityToken target,
float speedReductionFraction) |
SpeedReduction(SectorEntityToken target,
float speedReductionFraction,
float durationSeconds) |
| Modifier and Type | Method and Description |
|---|---|
void |
advance(float amount)
Use SectorAPI.getClock() to convert to campaign days.
|
boolean |
isDone() |
boolean |
runWhilePaused() |
protected float elapsed
protected SectorEntityToken target
protected float speedReductionRate
protected float durationSeconds
public SpeedReduction(SectorEntityToken target, float speedReductionFraction)
public SpeedReduction(SectorEntityToken target, float speedReductionFraction, float durationSeconds)
public void advance(float amount)
EveryFrameScriptadvance in interface EveryFrameScriptamount - seconds elapsed during the last frame.public boolean isDone()
isDone in interface EveryFrameScriptpublic boolean runWhilePaused()
runWhilePaused in interface EveryFrameScript