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(Vector2f dest,
float maxBurn) |
void |
moveTo(Vector2f dest,
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(Vector2f loc) |
void |
setNumSensorIndicators(int min,
int max,
java.util.Random random) |
void |
setVel(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 SensorGhost
public void addInterrupt(GhostBehaviorInterrupt interrupt)
public float getDespawnRange()
getDespawnRange
in interface SensorGhost
public void setDespawnRange(float despawnRange)
setDespawnRange
in interface SensorGhost
public 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(Vector2f loc)
public void setVel(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)
EveryFrameScript
advance
in interface EveryFrameScript
amount
- seconds elapsed during the last frame.public float getAccelMult()
public void setAccelMult(float accelMult)
public void moveTo(Vector2f dest, float maxBurn)
moveTo
in interface SensorGhost
public void moveTo(Vector2f dest, Vector2f destVel, float maxBurn)
moveTo
in interface SensorGhost
public int getMaxBurn()
getMaxBurn
in interface SensorGhost
public int getCurrBurn()
getCurrBurn
in interface SensorGhost
public float getAcceleration()
getAcceleration
in interface SensorGhost
public SmoothMovementUtil getMovement()
getMovement
in interface SensorGhost
public CustomCampaignEntityAPI getEntity()
getEntity
in interface SensorGhost
public boolean isDone()
isDone
in interface EveryFrameScript
public boolean runWhilePaused()
runWhilePaused
in interface EveryFrameScript
public boolean isDespawnOutsideSector()
public void setDespawnOutsideSector(boolean despawnOutsideSector)
public boolean isDespawnInAbyss()
isDespawnInAbyss
in interface SensorGhost
public void setDespawnInAbyss(boolean despawnInAbyss)
setDespawnInAbyss
in interface SensorGhost
public boolean isCreationFailed()
isCreationFailed
in interface SensorGhost
public void setCreationFailed()
public java.util.List<GhostBehavior> getScript()
getScript
in interface SensorGhost
public void clearScript()
clearScript
in interface SensorGhost
Copyright © 2013 Fractal Softworks, LLC. All Rights Reserved.