Package mindustry.type
Class Weather
java.lang.Object
mindustry.ctype.Content
mindustry.ctype.MappableContent
mindustry.ctype.UnlockableContent
mindustry.type.Weather
- All Implemented Interfaces:
Comparable<Content>
- Direct Known Subclasses:
MagneticStorm
,ParticleWeather
,RainWeather
,SolarFlare
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class mindustry.ctype.Content
Content.ModContentInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionfloat
Default duration of this weather event in ticks.boolean
float
static final arc.math.Rand
Global random variable used for rendering.arc.audio.Sound
float
float
float
float
boolean
float
boolean
arc.func.Prov<mindustry.gen.WeatherState>
Fields inherited from class mindustry.ctype.UnlockableContent
allDatabaseTabs, alwaysUnlocked, databaseTabs, description, details, fullIcon, fullOverride, generateIcons, hideDatabase, hideDetails, inlineDescription, localizedName, selectionSize, shownPlanets, stats, techNode, techNodes, uiIcon, unlocked
Fields inherited from class mindustry.ctype.MappableContent
name
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmindustry.gen.WeatherState
create()
mindustry.gen.WeatherState
create
(float intensity) mindustry.gen.WeatherState
create
(float intensity, float duration) static void
createWeather
(Weather weather, float intensity, float duration, float windX, float windY) static void
drawNoise
(arc.graphics.Texture noise, arc.graphics.Color color, float noisescl, float opacity, float baseSpeed, float intensity, float vwindx, float vwindy, float offset) static void
drawNoiseLayers
(arc.graphics.Texture noise, arc.graphics.Color color, float noisescl, float opacity, float baseSpeed, float intensity, float vwindx, float vwindy, int layers, float layerSpeedM, float layerAlphaM, float layerSclM, float layerColorM) void
drawOver
(mindustry.gen.WeatherState state) static void
drawParticles
(arc.graphics.g2d.TextureRegion region, arc.graphics.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) static void
drawRain
(float sizeMin, float sizeMax, float xspeed, float yspeed, float density, float intensity, float stroke, arc.graphics.Color color) static void
drawSplashes
(arc.graphics.g2d.TextureRegion[] splashes, float padding, float density, float intensity, float opacity, float timeScale, float stroke, arc.graphics.Color color, Liquid splasher) void
drawUnder
(mindustry.gen.WeatherState state) Returns the type name of this piece of content.mindustry.gen.WeatherState
instance()
boolean
isActive()
boolean
isHidden()
Whether this content is always hidden in the content database dialog.void
remove()
void
update
(mindustry.gen.WeatherState state) void
updateEffect
(mindustry.gen.WeatherState state) Methods inherited from class mindustry.ctype.UnlockableContent
checkStats, clearUnlock, createIcons, displayDescription, displayExtra, emoji, emojiChar, getDependencies, getLogicId, hasEmoji, isOnPlanet, loadIcon, locked, logicVisible, makeOutline, makeOutline, makeOutline, onUnlock, postInit, quietUnlock, researchRequirements, setStats, showUnlock, unlock, unlocked, unlockedHost, unlockedNow, unlockedNowHost
Methods inherited from class mindustry.ctype.MappableContent
toString
-
Field Details
-
rand
public static final arc.math.Rand randGlobal random variable used for rendering. -
duration
public float durationDefault duration of this weather event in ticks. -
opacityMultiplier
public float opacityMultiplier -
attrs
-
sound
public arc.audio.Sound sound -
soundVol
public float soundVol -
soundVolMin
public float soundVolMin -
soundVolOscMag
public float soundVolOscMag -
soundVolOscScl
public float soundVolOscScl -
type
public arc.func.Prov<mindustry.gen.WeatherState> type -
status
-
statusDuration
public float statusDuration -
statusAir
public boolean statusAir -
statusGround
public boolean statusGround
-
-
Constructor Details
-
Weather
-
Weather
-
-
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(arc.graphics.g2d.TextureRegion region, arc.graphics.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, arc.graphics.Color color) -
drawSplashes
public static void drawSplashes(arc.graphics.g2d.TextureRegion[] splashes, float padding, float density, float intensity, float opacity, float timeScale, float stroke, arc.graphics.Color color, Liquid splasher) -
drawNoiseLayers
public static void drawNoiseLayers(arc.graphics.Texture noise, arc.graphics.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(arc.graphics.Texture noise, arc.graphics.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 classUnlockableContent
-
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 classContent
-
createWeather
public static void createWeather(Weather weather, float intensity, float duration, float windX, float windY)
-