Package mindustry.entities
Class Effect
java.lang.Object
mindustry.entities.Effect
- Direct Known Subclasses:
ExplosionEffect
,MultiEffect
,ParticleEffect
,RadialEffect
,SeqEffect
,WaveEffect
,WrapEffect
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionfloat
Amount added to rotationfloat
Clip size.boolean
If true, parent unit is data are followed.final int
float
float
float
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
ConstructorDescriptionEffect()
Effect
(float life, float clipsize, Cons<Effect.EffectContainer> renderer) Effect
(float life, Cons<Effect.EffectContainer> renderer) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
at
(float x, float y) void
at
(float x, float y, float rotation) void
void
void
void
void
void
void
baseRotation
(float d) void
static void
decal
(TextureRegion region, float x, float y, float rotation) static void
decal
(TextureRegion region, float x, float y, float rotation, float lifetime, 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
init()
layer
(float l) layer
(float l, float duration) float
render
(int id, 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
boolean
startDelay
(float d)
-
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
-
at
-
at
-
at
public void at(float x, float y) -
at
public void at(float x, float y, float rotation) -
at
-
at
-
at
-
at
-
shouldCreate
public boolean shouldCreate() -
create
-
add
-
render
-
render
-
get
-
shake
public static void shake(float intensity, float duration, float x, float y) -
shake
-
floorDust
public static void floorDust(float x, float y, float size) -
floorDustAngle
-
decal
-
decal
public static void decal(TextureRegion region, float x, float y, float rotation, float lifetime, Color color) -
scorch
public static void scorch(float x, float y, int size) -
rubble
public static void rubble(float x, float y, int blockSize)
-