public class BaseSensorGhost extends java.lang.Object implements SensorGhost
| Modifier and Type | Class and Description |
|---|---|
static class |
BaseSensorGhost.DespawnReason |
| Modifier and Type | Field and Description |
|---|---|
protected float |
accelMult |
protected boolean |
creationFailed |
protected boolean |
despawnInAbyss |
protected boolean |
despawnOutsideSector |
protected float |
despawnRange |
protected CustomCampaignEntityAPI |
entity |
protected int |
fleeBurnLevel |
protected boolean |
fleeing |
protected SensorGhostManager |
manager |
protected SmoothMovementUtil |
movement |
protected java.util.List<GhostBehavior> |
script |
| Constructor and Description |
|---|
BaseSensorGhost(SensorGhostManager manager,
int fleeBurnLevel) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBehavior(GhostBehavior b) |
void |
addInterrupt(GhostBehaviorInterrupt interrupt) |
void |
advance(float amount)
Use SectorAPI.getClock() to convert to campaign days.
|
void |
clearScript() |
float |
genDelay(float base) |
float |
genFloat(float min,
float max) |
float |
genHugeSensorProfile() |
float |
genInt(int min,
int max) |
float |
genLargeRadius() |
float |
genLargeSensorProfile() |
float |
genMediumRadius() |
float |
genMediumSensorProfile() |
float |
genSmallRadius() |
float |
genSmallSensorProfile() |
float |
genTinyRadius() |
float |
genVerySmallRadius() |
float |
getAcceleration() |
float |
getAccelMult() |
int |
getCurrBurn() |
float |
getDespawnRange() |
CustomCampaignEntityAPI |
getEntity() |
int |
getMaxBurn() |
SmoothMovementUtil |
getMovement() |
java.util.Random |
getRandom() |
java.util.List<GhostBehavior> |
getScript() |
void |
initEntity(float sensorProfile,
float radius) |
void |
initEntity(float sensorProfile,
float radius,
int extraSensorInds) |
void |
initEntity(float sensorProfile,
float radius,
int extraSensorInds,
LocationAPI where) |
boolean |
isCreationFailed() |
boolean |
isDespawnInAbyss() |
boolean |
isDespawnOutsideSector() |
boolean |
isDone() |
void |
moveTo(org.lwjgl.util.vector.Vector2f dest,
float maxBurn) |
void |
moveTo(org.lwjgl.util.vector.Vector2f dest,
org.lwjgl.util.vector.Vector2f destVel,
float maxBurn) |
void |
placeNearEntity(SectorEntityToken entity,
float minDist,
float maxDist) |
boolean |
placeNearPlayer() |
boolean |
placeNearPlayer(float minDist,
float maxDist) |
protected java.lang.Object |
readResolve() |
protected void |
reportDespawning(BaseSensorGhost.DespawnReason reason,
java.lang.Object param) |
boolean |
runWhilePaused() |
void |
setAccelMult(float accelMult) |
void |
setCreationFailed() |
void |
setDespawnInAbyss(boolean despawnInAbyss) |
void |
setDespawnOutsideSector(boolean despawnOutsideSector) |
void |
setDespawnRange(float despawnRange) |
void |
setLoc(org.lwjgl.util.vector.Vector2f loc) |
void |
setNumSensorIndicators(int min,
int max,
java.util.Random random) |
void |
setVel(org.lwjgl.util.vector.Vector2f vel) |
protected CustomCampaignEntityAPI entity
protected float despawnRange
protected boolean despawnOutsideSector
protected boolean despawnInAbyss
protected boolean fleeing
protected int fleeBurnLevel
protected float accelMult
protected transient boolean creationFailed
protected SmoothMovementUtil movement
protected java.util.List<GhostBehavior> script
protected SensorGhostManager manager
public BaseSensorGhost(SensorGhostManager manager, int fleeBurnLevel)
protected java.lang.Object readResolve()
public void addBehavior(GhostBehavior b)
addBehavior in interface SensorGhostpublic void addInterrupt(GhostBehaviorInterrupt interrupt)
public float getDespawnRange()
getDespawnRange in interface SensorGhostpublic void setDespawnRange(float despawnRange)
setDespawnRange in interface SensorGhostpublic java.util.Random getRandom()
public float genSmallSensorProfile()
public float genMediumSensorProfile()
public float genLargeSensorProfile()
public float genHugeSensorProfile()
public float genTinyRadius()
public float genVerySmallRadius()
public float genSmallRadius()
public float genMediumRadius()
public float genLargeRadius()
public float genFloat(float min, float max)
public float genInt(int min, int max)
public float genDelay(float base)
public boolean placeNearPlayer()
public boolean placeNearPlayer(float minDist, float maxDist)
public void placeNearEntity(SectorEntityToken entity, float minDist, float maxDist)
public void setLoc(org.lwjgl.util.vector.Vector2f loc)
public void setVel(org.lwjgl.util.vector.Vector2f vel)
public void initEntity(float sensorProfile, float radius)
public void initEntity(float sensorProfile, float radius, int extraSensorInds)
public void initEntity(float sensorProfile, float radius, int extraSensorInds, LocationAPI where)
public void setNumSensorIndicators(int min, int max, java.util.Random random)
protected void reportDespawning(BaseSensorGhost.DespawnReason reason, java.lang.Object param)
public void advance(float amount)
EveryFrameScriptadvance in interface EveryFrameScriptamount - seconds elapsed during the last frame.public float getAccelMult()
public void setAccelMult(float accelMult)
public void moveTo(org.lwjgl.util.vector.Vector2f dest, float maxBurn)
moveTo in interface SensorGhostpublic void moveTo(org.lwjgl.util.vector.Vector2f dest, org.lwjgl.util.vector.Vector2f destVel, float maxBurn)
moveTo in interface SensorGhostpublic int getMaxBurn()
getMaxBurn in interface SensorGhostpublic int getCurrBurn()
getCurrBurn in interface SensorGhostpublic float getAcceleration()
getAcceleration in interface SensorGhostpublic SmoothMovementUtil getMovement()
getMovement in interface SensorGhostpublic CustomCampaignEntityAPI getEntity()
getEntity in interface SensorGhostpublic boolean isDone()
isDone in interface EveryFrameScriptpublic boolean runWhilePaused()
runWhilePaused in interface EveryFrameScriptpublic boolean isDespawnOutsideSector()
public void setDespawnOutsideSector(boolean despawnOutsideSector)
public boolean isDespawnInAbyss()
isDespawnInAbyss in interface SensorGhostpublic void setDespawnInAbyss(boolean despawnInAbyss)
setDespawnInAbyss in interface SensorGhostpublic boolean isCreationFailed()
isCreationFailed in interface SensorGhostpublic void setCreationFailed()
public java.util.List<GhostBehavior> getScript()
getScript in interface SensorGhostpublic void clearScript()
clearScript in interface SensorGhost