public class SlipstreamEntityPlugin extends BaseCustomEntityPlugin
| Modifier and Type | Class and Description |
|---|---|
static class |
SlipstreamEntityPlugin.SlipstreamParams |
static class |
SlipstreamEntityPlugin.SlipstreamParticle |
| Modifier and Type | Field and Description |
|---|---|
protected FaderUtil |
fader |
static float |
MAX_PARTICLES_ADD_PER_FRAME |
protected SlipstreamEntityPlugin.SlipstreamParams |
params |
protected java.util.List<SlipstreamEntityPlugin.SlipstreamParticle> |
particles |
protected boolean |
playerWasInSlipstream |
static float |
RAD_PER_DEG |
protected float |
texelsPerPixel |
protected float |
texProgress1 |
protected float |
texProgress2 |
protected float |
texProgress3 |
entity| Constructor and Description |
|---|
SlipstreamEntityPlugin() |
| Modifier and Type | Method and Description |
|---|---|
void |
advance(float amount) |
void |
applyEffect(SectorEntityToken other,
float days) |
void |
applyEffectToFleets(float amount) |
float[] |
getLengthAndWidthFractionWithinStream(org.lwjgl.util.vector.Vector2f loc)
result[0] = along the length of the field, 0 = at start, 1 = at tail
result[1] = along the width of the field, 0 = on center, 1 = on edge, no directional information
null if outside stream
Assumes rectangular, non-tapered stream
|
java.awt.Color |
getRandomColor() |
float |
getRenderRange()
How far away from the viewport the center of this entity can be before it stops being rendered.
|
void |
init(SectorEntityToken entity,
java.lang.Object pluginParams) |
void |
render(CampaignEngineLayers layer,
ViewportAPI viewport)
Should only render for specified layer.
|
void |
renderLayer(SpriteAPI sprite,
float texProgress,
float alpha) |
static org.lwjgl.util.vector.Vector2f |
rotateAroundOrigin(org.lwjgl.util.vector.Vector2f v,
float cos,
float sin) |
appendToCampaignTooltip, createMapTooltip, getMapTooltipWidth, hasCustomMapTooltip, isMapTooltipExpandableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisRenderWhenViewportAlphaMultIsZeropublic static float MAX_PARTICLES_ADD_PER_FRAME
public static float RAD_PER_DEG
protected SlipstreamEntityPlugin.SlipstreamParams params
protected float texelsPerPixel
protected transient java.util.List<SlipstreamEntityPlugin.SlipstreamParticle> particles
protected float texProgress1
protected float texProgress2
protected float texProgress3
protected boolean playerWasInSlipstream
public SlipstreamEntityPlugin()
public static org.lwjgl.util.vector.Vector2f rotateAroundOrigin(org.lwjgl.util.vector.Vector2f v, float cos, float sin)
public void init(SectorEntityToken entity, java.lang.Object pluginParams)
init in interface CustomCampaignEntityPlugininit in class BaseCustomEntityPluginpublic float getRenderRange()
CustomCampaignEntityPlugingetRenderRange in interface CustomCampaignEntityPlugingetRenderRange in class BaseCustomEntityPluginpublic void advance(float amount)
advance in interface CustomCampaignEntityPluginadvance in class BaseCustomEntityPluginamount - in seconds. Use SectorAPI.getClock() to figure out how many campaign days that is.public void render(CampaignEngineLayers layer, ViewportAPI viewport)
CustomCampaignEntityPluginrender in interface CustomCampaignEntityPluginrender in class BaseCustomEntityPluginpublic void renderLayer(SpriteAPI sprite, float texProgress, float alpha)
public java.awt.Color getRandomColor()
public float[] getLengthAndWidthFractionWithinStream(org.lwjgl.util.vector.Vector2f loc)
loc - public void applyEffectToFleets(float amount)
public void applyEffect(SectorEntityToken other, float days)