Class GateEntityPlugin
java.lang.Object
com.fs.starfarer.api.impl.campaign.BaseCustomEntityPlugin
com.fs.starfarer.api.impl.campaign.GateEntityPlugin
- All Implemented Interfaces:
CustomCampaignEntityPlugin
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic float
protected float
protected SpriteAPI
protected boolean
protected SpriteAPI
protected FaderUtil
static String
protected SpriteAPI
static String
static String
static String
protected FaderUtil
protected float
protected JitterUtil
protected Color
protected FaderUtil
protected boolean
static float
protected IntervalUtil
static String
static String
protected SpriteAPI
protected boolean
protected SpriteAPI
protected float
protected SpriteAPI
protected WarpingSpriteRendererUtil
protected SpriteAPI
protected SpriteAPI
Fields inherited from class com.fs.starfarer.api.impl.campaign.BaseCustomEntityPlugin
entity
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
void
advance
(float amount) void
appendToCampaignTooltip
(TooltipMakerAPI tooltip, SectorEntityToken.VisibilityLevel level) static boolean
static boolean
void
createMapTooltip
(TooltipMakerAPI tooltip, boolean expanded) static GateEntityPlugin.GateData
float
static int
float
float
How far away from the viewport the center of this entity can be before it stops being rendered.boolean
void
init
(SectorEntityToken entity, Object pluginParams) boolean
isActive()
static boolean
isActive
(SectorEntityToken gate) static boolean
isScanned
(SectorEntityToken gate) void
jitter()
void
void
render
(CampaignEngineLayers layer, ViewportAPI viewport) Should only render for specified layer.protected void
void
setJitterColor
(Color jitterColor) void
showBeingUsed
(float transitDistLY) void
showBeingUsed
(float dur, float transitDistLY) Methods inherited from class com.fs.starfarer.api.impl.campaign.BaseCustomEntityPlugin
getMapTooltipWidth, 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
-
ACCUMULATED_TRANSIT_DIST_DECAY_RATE
public static float ACCUMULATED_TRANSIT_DIST_DECAY_RATE -
MOTE_SPAWN_MULT_BASELINE_DIST_LY
public static float MOTE_SPAWN_MULT_BASELINE_DIST_LY -
GATE_DATA
-
GATE_SCANNED
-
CAN_SCAN_GATES
-
GATES_ACTIVE
-
PLAYER_CAN_USE_GATES
-
NUM_GATES_SCANNED
-
baseSprite
-
scannedGlow
-
activeGlow
-
whirl1
-
whirl2
-
starfield
-
rays
-
concentric
-
warp
-
beingUsedFader
-
glowFader
-
madeActive
protected boolean madeActive -
addedIntel
protected boolean addedIntel -
showBeingUsedDur
protected float showBeingUsedDur -
accumulatedTransitDistLY
protected float accumulatedTransitDistLY -
jitterColor
-
jitter
-
jitterFader
-
moteSpawn
-
inUseAngle
protected float inUseAngle -
scaledSprites
protected transient boolean scaledSprites
-
-
Constructor Details
-
GateEntityPlugin
public GateEntityPlugin()
-
-
Method Details
-
getNumGatesScanned
public static int getNumGatesScanned() -
addGateScanned
public static void addGateScanned() -
getGateData
-
isScanned
-
isActive
-
areGatesActive
public static boolean areGatesActive() -
canUseGates
public static boolean canUseGates() -
init
- Specified by:
init
in interfaceCustomCampaignEntityPlugin
- Overrides:
init
in classBaseCustomEntityPlugin
-
jitter
public void jitter() -
getJitterLevel
public float getJitterLevel() -
getJitterColor
-
setJitterColor
-
isActive
public boolean isActive() -
showBeingUsed
public void showBeingUsed(float transitDistLY) -
showBeingUsed
public void showBeingUsed(float dur, float transitDistLY) -
getProximitySoundFactor
public float getProximitySoundFactor() -
playProximityLoop
public void playProximityLoop() -
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.
-
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:
-
createMapTooltip
- Specified by:
createMapTooltip
in interfaceCustomCampaignEntityPlugin
- Overrides:
createMapTooltip
in classBaseCustomEntityPlugin
-
hasCustomMapTooltip
public boolean hasCustomMapTooltip()- Specified by:
hasCustomMapTooltip
in interfaceCustomCampaignEntityPlugin
- Overrides:
hasCustomMapTooltip
in classBaseCustomEntityPlugin
-
appendToCampaignTooltip
public void appendToCampaignTooltip(TooltipMakerAPI tooltip, SectorEntityToken.VisibilityLevel level) - Specified by:
appendToCampaignTooltip
in interfaceCustomCampaignEntityPlugin
- Overrides:
appendToCampaignTooltip
in classBaseCustomEntityPlugin
-
scaleGlowSprites
protected void scaleGlowSprites() -
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
-