Class Weather

All Implemented Interfaces:
Comparable<Content>
Direct Known Subclasses:
MagneticStorm, ParticleWeather, RainWeather, SolarFlare

public class Weather extends UnlockableContent
  • Field Details

    • rand

      public static final Rand rand
      Global random variable used for rendering.
    • duration

      public float duration
      Default duration of this weather event in ticks.
    • opacityMultiplier

      public float opacityMultiplier
    • attrs

      public Attributes attrs
    • sound

      public Sound sound
    • soundVol

      public float soundVol
    • soundVolMin

      public float soundVolMin
    • soundVolOscMag

      public float soundVolOscMag
    • soundVolOscScl

      public float soundVolOscScl
    • hidden

      public boolean hidden
    • type

      public Prov<mindustry.gen.WeatherState> type
    • status

      public StatusEffect status
    • statusDuration

      public float statusDuration
    • statusAir

      public boolean statusAir
    • statusGround

      public boolean statusGround
  • Constructor Details

    • Weather

      public Weather(String name, Prov<mindustry.gen.WeatherState> type)
    • Weather

      public Weather(String name)
  • Method Details

    • create

      public mindustry.gen.WeatherState create()
    • create

      public mindustry.gen.WeatherState create(float intensity)
    • create

      public mindustry.gen.WeatherState create(float intensity, float duration)
    • instance

      @Nullable public mindustry.gen.WeatherState instance()
    • isActive

      public boolean isActive()
    • remove

      public void remove()
    • update

      public void update(mindustry.gen.WeatherState state)
    • updateEffect

      public void updateEffect(mindustry.gen.WeatherState state)
    • drawOver

      public void drawOver(mindustry.gen.WeatherState state)
    • drawUnder

      public void drawUnder(mindustry.gen.WeatherState state)
    • drawParticles

      public static void drawParticles(TextureRegion region, Color color, float sizeMin, float sizeMax, float density, float intensity, float opacity, float windx, float windy, float minAlpha, float maxAlpha, float sinSclMin, float sinSclMax, float sinMagMin, float sinMagMax, boolean randomParticleRotation)
    • drawRain

      public static void drawRain(float sizeMin, float sizeMax, float xspeed, float yspeed, float density, float intensity, float stroke, Color color)
    • drawSplashes

      public static void drawSplashes(TextureRegion[] splashes, float padding, float density, float intensity, float opacity, float timeScale, float stroke, Color color, Liquid splasher)
    • drawNoiseLayers

      public static void drawNoiseLayers(Texture noise, Color color, float noisescl, float opacity, float baseSpeed, float intensity, float vwindx, float vwindy, int layers, float layerSpeedM, float layerAlphaM, float layerSclM, float layerColorM)
    • drawNoise

      public static void drawNoise(Texture noise, Color color, float noisescl, float opacity, float baseSpeed, float intensity, float vwindx, float vwindy, float offset)
    • isHidden

      public boolean isHidden()
      Description copied from class: UnlockableContent
      Whether this content is always hidden in the content database dialog.
      Overrides:
      isHidden in class UnlockableContent
    • getContentType

      public ContentType getContentType()
      Description copied from class: Content
      Returns the type name of this piece of content. This should return the same value for all instances of this content type.
      Specified by:
      getContentType in class Content
    • createWeather

      public static void createWeather(Weather weather, float intensity, float duration, float windX, float windY)