Package mindustry.entities
Class Effect
java.lang.Object
mindustry.entities.Effect
- Direct Known Subclasses:
ExplosionEffect,MultiEffect,ParticleEffect,RadialEffect,SeqEffect,SoundEffect,WaveEffect,WrapEffect
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final arc.struct.Seq<Effect>floatAmount added to rotationfloatClip size.booleanIf true, parent unit is data are followed.final intfloatfloatfloatarc.func.Cons<Effect.EffectContainer>booleanIf this and followParent are true, the effect will offset and rotate with the parent's rotation.floatTime delay before the effect starts -
Constructor Summary
ConstructorsConstructorDescriptionEffect()Effect(float life, float clipsize, arc.func.Cons<Effect.EffectContainer> renderer) Effect(float life, arc.func.Cons<Effect.EffectContainer> renderer) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidat(float x, float y) voidat(float x, float y, float rotation) voidat(float x, float y, float rotation, arc.graphics.Color color) voidvoidvoidat(float x, float y, arc.graphics.Color color) voidat(arc.math.geom.Position pos) voidat(arc.math.geom.Position pos, boolean parentize) voidat(arc.math.geom.Position pos, float rotation) baseRotation(float d) voidstatic voiddecal(arc.graphics.g2d.TextureRegion region, float x, float y, float rotation) static voiddecal(arc.graphics.g2d.TextureRegion region, float x, float y, float rotation, float lifetime, arc.graphics.Color color) static voidfloorDust(float x, float y, float size) static voidfloorDustAngle(Effect effect, float x, float y, float angle) followParent(boolean follow) static Effectget(int id) voidinit()layer(float l) layer(float l, float duration) floatrender(int id, arc.graphics.Color color, float life, float lifetime, float rotation, float x, float y, Object data) voidrotWithParent(boolean follow) static voidrubble(float x, float y, int blockSize) static voidscorch(float x, float y, int size) static voidshake(float intensity, float duration, float x, float y) static voidshake(float intensity, float duration, arc.math.geom.Position loc) booleanstartDelay(float d) wrap(arc.graphics.Color color) wrap(arc.graphics.Color color, float rotation)
-
Field Details
-
all
-
id
public final int id -
renderer
-
lifetime
public float lifetime -
clip
public float clipClip size. -
startDelay
public float startDelayTime delay before the effect starts -
baseRotation
public float baseRotationAmount added to rotation -
followParent
public boolean followParentIf true, parent unit is data are followed. -
rotWithParent
public boolean rotWithParentIf this and followParent are true, the effect will offset and rotate with the parent's rotation. -
layer
public float layer -
layerDuration
public float layerDuration
-
-
Constructor Details
-
Effect
-
Effect
-
Effect
public Effect()
-
-
Method Details
-
startDelay
-
init
public void init() -
followParent
-
rotWithParent
-
layer
-
baseRotation
-
layer
-
wrap
-
wrap
-
at
public void at(arc.math.geom.Position pos) -
at
public void at(arc.math.geom.Position pos, boolean parentize) -
at
public void at(arc.math.geom.Position pos, float rotation) -
at
public void at(float x, float y) -
at
public void at(float x, float y, float rotation) -
at
public void at(float x, float y, float rotation, arc.graphics.Color color) -
at
public void at(float x, float y, arc.graphics.Color color) -
at
-
at
-
shouldCreate
public boolean shouldCreate() -
create
-
add
-
render
public float render(int id, arc.graphics.Color color, float life, float lifetime, float rotation, float x, float y, Object data) -
render
-
get
-
shake
public static void shake(float intensity, float duration, float x, float y) -
shake
public static void shake(float intensity, float duration, arc.math.geom.Position loc) -
floorDust
public static void floorDust(float x, float y, float size) -
floorDustAngle
-
decal
public static void decal(arc.graphics.g2d.TextureRegion region, float x, float y, float rotation) -
decal
public static void decal(arc.graphics.g2d.TextureRegion region, float x, float y, float rotation, float lifetime, arc.graphics.Color color) -
scorch
public static void scorch(float x, float y, int size) -
rubble
public static void rubble(float x, float y, int blockSize)
-