Class Effect

java.lang.Object
mindustry.entities.Effect
Direct Known Subclasses:
ExplosionEffect, MultiEffect, ParticleEffect, RadialEffect, SeqEffect, SoundEffect, WaveEffect, WrapEffect

public class Effect extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final arc.struct.Seq<Effect>
     
    float
    Amount added to rotation
    float
    Clip size.
    boolean
    If true, parent unit is data are followed.
    final int
     
    float
     
    float
     
    float
     
    arc.func.Cons<Effect.EffectContainer>
     
    boolean
    If this and followParent are true, the effect will offset and rotate with the parent's rotation.
    float
    Time delay before the effect starts
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Effect(float life, float clipsize, arc.func.Cons<Effect.EffectContainer> renderer)
     
    Effect(float life, arc.func.Cons<Effect.EffectContainer> renderer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    add(float x, float y, float rotation, arc.graphics.Color color, Object data)
     
    void
    at(float x, float y)
     
    void
    at(float x, float y, float rotation)
     
    void
    at(float x, float y, float rotation, arc.graphics.Color color)
     
    void
    at(float x, float y, float rotation, arc.graphics.Color color, Object data)
     
    void
    at(float x, float y, float rotation, Object data)
     
    void
    at(float x, float y, arc.graphics.Color color)
     
    void
    at(arc.math.geom.Position pos)
     
    void
    at(arc.math.geom.Position pos, boolean parentize)
     
    void
    at(arc.math.geom.Position pos, float rotation)
     
    baseRotation(float d)
     
    void
    create(float x, float y, float rotation, arc.graphics.Color color, Object data)
     
    static void
    decal(arc.graphics.g2d.TextureRegion region, float x, float y, float rotation)
     
    static void
    decal(arc.graphics.g2d.TextureRegion region, float x, float y, float rotation, float lifetime, arc.graphics.Color color)
     
    static void
    floorDust(float x, float y, float size)
     
    static void
    floorDustAngle(Effect effect, float x, float y, float angle)
     
    followParent(boolean follow)
     
    static Effect
    get(int id)
     
    void
     
    layer(float l)
     
    layer(float l, float duration)
     
    float
    render(int id, arc.graphics.Color color, float life, float lifetime, float rotation, float x, float y, Object data)
     
    void
     
    rotWithParent(boolean follow)
     
    static void
    rubble(float x, float y, int blockSize)
     
    static void
    scorch(float x, float y, int size)
     
    static void
    shake(float intensity, float duration, float x, float y)
     
    static void
    shake(float intensity, float duration, arc.math.geom.Position loc)
     
    boolean
     
    startDelay(float d)
     
    wrap(arc.graphics.Color color)
     
    wrap(arc.graphics.Color color, float rotation)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • all

      public static final arc.struct.Seq<Effect> all
    • id

      public final int id
    • renderer

      public arc.func.Cons<Effect.EffectContainer> renderer
    • lifetime

      public float lifetime
    • clip

      public float clip
      Clip size.
    • startDelay

      public float startDelay
      Time delay before the effect starts
    • baseRotation

      public float baseRotation
      Amount added to rotation
    • followParent

      public boolean followParent
      If true, parent unit is data are followed.
    • rotWithParent

      public boolean rotWithParent
      If 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

  • Method Details

    • startDelay

      public Effect startDelay(float d)
    • init

      public void init()
    • followParent

      public Effect followParent(boolean follow)
    • rotWithParent

      public Effect rotWithParent(boolean follow)
    • layer

      public Effect layer(float l)
    • baseRotation

      public Effect baseRotation(float d)
    • layer

      public Effect layer(float l, float duration)
    • wrap

      public WrapEffect wrap(arc.graphics.Color color)
    • wrap

      public WrapEffect wrap(arc.graphics.Color color, float rotation)
    • 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

      public void at(float x, float y, float rotation, arc.graphics.Color color, Object data)
    • at

      public void at(float x, float y, float rotation, Object data)
    • shouldCreate

      public boolean shouldCreate()
    • create

      public void create(float x, float y, float rotation, arc.graphics.Color color, Object data)
    • add

      protected void add(float x, float y, float rotation, arc.graphics.Color color, Object data)
    • render

      public float render(int id, arc.graphics.Color color, float life, float lifetime, float rotation, float x, float y, Object data)
    • render

      public void render(Effect.EffectContainer e)
    • get

      @Nullable public static Effect get(int id)
    • 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

      public static void floorDustAngle(Effect effect, float x, float y, float angle)
    • 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)