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(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 Vector2f |
rotateAroundOrigin(Vector2f v,
float cos,
float sin) |
appendToCampaignTooltip, createMapTooltip, getMapTooltipWidth, hasCustomMapTooltip, isMapTooltipExpandable
public 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 FaderUtil fader
protected boolean playerWasInSlipstream
public static Vector2f rotateAroundOrigin(Vector2f v, float cos, float sin)
public void init(SectorEntityToken entity, java.lang.Object pluginParams)
init
in interface CustomCampaignEntityPlugin
init
in class BaseCustomEntityPlugin
public float getRenderRange()
CustomCampaignEntityPlugin
getRenderRange
in interface CustomCampaignEntityPlugin
getRenderRange
in class BaseCustomEntityPlugin
public void advance(float amount)
advance
in interface CustomCampaignEntityPlugin
advance
in class BaseCustomEntityPlugin
amount
- in seconds. Use SectorAPI.getClock() to figure out how many campaign days that is.public void render(CampaignEngineLayers layer, ViewportAPI viewport)
CustomCampaignEntityPlugin
render
in interface CustomCampaignEntityPlugin
render
in class BaseCustomEntityPlugin
public void renderLayer(SpriteAPI sprite, float texProgress, float alpha)
public java.awt.Color getRandomColor()
public float[] getLengthAndWidthFractionWithinStream(Vector2f loc)
loc
- public void applyEffectToFleets(float amount)
public void applyEffect(SectorEntityToken other, float days)
Copyright © 2013 Fractal Softworks, LLC. All Rights Reserved.