Class TurbulenceEntityPlugin
java.lang.Object
com.fs.starfarer.api.impl.campaign.BaseCustomEntityPlugin
com.fs.starfarer.api.impl.campaign.velfield.TurbulenceEntityPlugin
- All Implemented Interfaces:
CustomCampaignEntityPlugin
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<TurbulenceEntityPlugin.ParticleData>
protected float
protected VelocityField
protected int
protected List<TurbulenceEntityPlugin.ParticleData>
protected List<TurbulenceEntityPlugin.PointParticle>
Fields inherited from class com.fs.starfarer.api.impl.campaign.BaseCustomEntityPlugin
entity
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTestParticle
(org.lwjgl.util.vector.Vector2f loc, Color color, float size, float mass, float dur) void
addTexturedParticle
(org.lwjgl.util.vector.Vector2f loc, Color color, float mass, float size, float endSizeMult, float durIn, float durOut) void
advance
(float amount) getField()
float
How far away from the viewport the center of this entity can be before it stops being rendered.void
init
(SectorEntityToken entity, Object pluginParams) void
render
(CampaignEngineLayers layer, ViewportAPI viewport) Should only render for specified layer.void
renderTextureParticles
(CampaignEngineLayers layer, ViewportAPI viewport) void
setField
(VelocityField field) Methods inherited from class com.fs.starfarer.api.impl.campaign.BaseCustomEntityPlugin
appendToCampaignTooltip, createMapTooltip, getMapTooltipWidth, hasCustomMapTooltip, isMapTooltipExpandable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.fs.starfarer.api.campaign.CustomCampaignEntityPlugin
isRenderWhenViewportAlphaMultIsZero
-
Field Details
-
particles
-
darkParticles
-
field
-
testParticles
-
frame
protected int frame -
distanceTravelled
protected float distanceTravelled
-
-
Constructor Details
-
TurbulenceEntityPlugin
public TurbulenceEntityPlugin()
-
-
Method Details
-
getField
-
setField
-
init
- Specified by:
init
in interfaceCustomCampaignEntityPlugin
- Overrides:
init
in classBaseCustomEntityPlugin
-
getRenderRange
public float getRenderRange()Description copied from interface:CustomCampaignEntityPlugin
How far away from the viewport the center of this entity can be before it stops being rendered. Should at least be the radius of the entity; sometimes more may be necessary depending on the visual effect desired.- Specified by:
getRenderRange
in interfaceCustomCampaignEntityPlugin
- Overrides:
getRenderRange
in classBaseCustomEntityPlugin
- Returns:
-
advance
public void advance(float amount) - Specified by:
advance
in interfaceCustomCampaignEntityPlugin
- Overrides:
advance
in classBaseCustomEntityPlugin
- Parameters:
amount
- in seconds. Use SectorAPI.getClock() to figure out how many campaign days that is.
-
render
Description copied from interface:CustomCampaignEntityPlugin
Should only render for specified layer. Will be called once per each layer, per frame. Needs to respect viewport.getAlphaMult() - i.e. use that alpha value for rendering. Needs to render at the entity's location - there's no translation before this method call. If a sprite is specified, it will be rendered in the bottommost layer of the layers this entity renders for. This method will be called after the sprite has rendered.- Specified by:
render
in interfaceCustomCampaignEntityPlugin
- Overrides:
render
in classBaseCustomEntityPlugin
-
renderTextureParticles
-
addTestParticle
public void addTestParticle(org.lwjgl.util.vector.Vector2f loc, Color color, float size, float mass, float dur) -
addTexturedParticle
public void addTexturedParticle(org.lwjgl.util.vector.Vector2f loc, Color color, float mass, float size, float endSizeMult, float durIn, float durOut) -
getRandomColor
-