Package com.fs.starfarer.api.combat
Interface ShieldAPI
public interface ShieldAPI
- Author:
- Alex Mosolov Copyright 2012 Fractal Softworks, LLC
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyShieldEffects
(Color innerColor, Color ringColor, float thicknessBonus, float fluctuationBonus, float effectLevel) void
forceFacing
(float facing) float
float
getArc()
float
float
Does not include shield damage taken mult, but does include absorbption mult.float
For shield textures, visual only.org.lwjgl.util.vector.Vector2f
float
float
For shield textures, visual only.getType()
float
float
Flux/second while shield is on.boolean
isOff()
boolean
isOn()
boolean
boolean
isWithinArc
(org.lwjgl.util.vector.Vector2f point) void
setActiveArc
(float activeArc) void
setArc
(float arc) Set the maximum arc.void
setCenter
(float x, float y) void
setInnerColor
(Color color) void
setInnerRotationRate
(float innerRotationRate) For shield textures, visual only.void
setRadius
(float radius) void
Textures should be already loaded (i.e.void
setRingColor
(Color ringColor) void
setRingRotationRate
(float ringRotationRate) For shield textures, visual only.void
setSkipRendering
(boolean skipRendering) void
setType
(ShieldAPI.ShieldType type) void
void
toggleOn()
-
Method Details
-
setType
-
getType
ShieldAPI.ShieldType getType() -
getFacing
float getFacing() -
getArc
float getArc()- Returns:
- maximum arc.
-
getActiveArc
float getActiveArc()- Returns:
- currently open arc (0 if not on)
-
setActiveArc
void setActiveArc(float activeArc) -
getRadius
float getRadius() -
isOn
boolean isOn() -
isOff
boolean isOff() -
getLocation
org.lwjgl.util.vector.Vector2f getLocation()- Returns:
- location of the center of the shield, in engine coordinates.
-
isWithinArc
boolean isWithinArc(org.lwjgl.util.vector.Vector2f point) -
toggleOff
void toggleOff() -
getFluxPerPointOfDamage
float getFluxPerPointOfDamage()Does not include shield damage taken mult, but does include absorbption mult.- Returns:
-
setArc
void setArc(float arc) Set the maximum arc.- Parameters:
arc
-
-
setInnerColor
-
setRingColor
-
getInnerColor
Color getInnerColor() -
getRingColor
Color getRingColor() -
getUpkeep
float getUpkeep()Flux/second while shield is on.- Returns:
-
forceFacing
void forceFacing(float facing) -
setRadius
void setRadius(float radius) -
setRadius
Textures should be already loaded (i.e. via settings.json).- Parameters:
radius
-textureInner
-textureRing
-
-
toggleOn
void toggleOn() -
getUnfoldTime
float getUnfoldTime() -
setCenter
void setCenter(float x, float y) -
getInnerRotationRate
float getInnerRotationRate()For shield textures, visual only.- Returns:
-
setInnerRotationRate
void setInnerRotationRate(float innerRotationRate) For shield textures, visual only. -
getRingRotationRate
float getRingRotationRate()For shield textures, visual only.- Returns:
-
setRingRotationRate
void setRingRotationRate(float ringRotationRate) For shield textures, visual only. -
isSkipRendering
boolean isSkipRendering() -
setSkipRendering
void setSkipRendering(boolean skipRendering) -
applyShieldEffects
-