Package com.prineside.tdi2.shapes
Class ChainLightning
java.lang.Object
com.prineside.tdi2.Shape
com.prineside.tdi2.shapes.ChainLightning
- All Implemented Interfaces:
com.badlogic.gdx.utils.Pool.Poolable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.prineside.tdi2.Shape
Shape.Factory<T extends Shape>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final float
static final float
static final float
-
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(com.badlogic.gdx.graphics.g2d.Batch batch) void
free()
com.badlogic.gdx.graphics.Color
getColor()
float
float
float
boolean
void
reset()
Resets the object for reuse.void
setColor
(com.badlogic.gdx.graphics.Color color) void
setFadingToEnd
(boolean fadingToEnd) void
setPosition
(float startX, float startY, float endX, float endY) void
setTexture
(com.badlogic.gdx.graphics.g2d.TextureRegion texture, boolean mirror, boolean flip) void
setup
(float startX, float startY, float endX, float endY, float regenerationInterval, float drawDuration, boolean fadeOut, float minWidth, float maxWidth, float averageLength) void
update
(float deltaTime)
-
Field Details
-
AVERAGE_SEGMENT_LENGTH
public static final float AVERAGE_SEGMENT_LENGTH- See Also:
-
MIN_SEGMENT_WIDTH
public static final float MIN_SEGMENT_WIDTH- See Also:
-
MAX_SEGMENT_WIDTH
public static final float MAX_SEGMENT_WIDTH- See Also:
-
-
Method Details
-
setFadingToEnd
public void setFadingToEnd(boolean fadingToEnd) -
getExistsTime
public float getExistsTime() -
getStartX
public float getStartX() -
getStartY
public float getStartY() -
reset
public void reset()Description copied from interface:com.badlogic.gdx.utils.Pool.Poolable
Resets the object for reuse. Object references should be nulled and fields may be set to default values. -
setPosition
public void setPosition(float startX, float startY, float endX, float endY) -
setup
public void setup(float startX, float startY, float endX, float endY, float regenerationInterval, float drawDuration, boolean fadeOut, float minWidth, float maxWidth, float averageLength) -
setTexture
public void setTexture(com.badlogic.gdx.graphics.g2d.TextureRegion texture, boolean mirror, boolean flip) -
setColor
public void setColor(com.badlogic.gdx.graphics.Color color) -
getColor
public com.badlogic.gdx.graphics.Color getColor() -
update
public void update(float deltaTime) -
isFinished
public boolean isFinished() -
draw
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch) -
free
public void free()
-