Struct WeatherState
An immutable snapshot of the game's active weather-condition weights. Each value is normally normalized between 0 and 1 by the game.
public readonly struct WeatherState : IEquatable<WeatherState>
- Implements
- Inherited Members
- Extension Methods
Constructors
WeatherState(float, float, float, float, float, float, float, float, float)
Creates a weather snapshot from the nine native weather components.
public WeatherState(float sunny, float cloudy, float rainy, float stormy, float snowy, float foggy, float windy, float hail, float sleet)
Parameters
sunnyfloatThe sunny-condition weight.
cloudyfloatThe cloudy-condition weight.
rainyfloatThe rainy-condition weight.
stormyfloatThe stormy-condition weight.
snowyfloatThe snowy-condition weight.
foggyfloatThe foggy-condition weight.
windyfloatThe windy-condition weight.
hailfloatThe hail-condition weight.
sleetfloatThe sleet-condition weight.
Properties
Cloudy
Gets the cloudy-condition weight.
public float Cloudy { get; }
Property Value
Foggy
Gets the foggy-condition weight.
public float Foggy { get; }
Property Value
Hail
Gets the hail-condition weight.
public float Hail { get; }
Property Value
Rainy
Gets the rainy-condition weight.
public float Rainy { get; }
Property Value
Sleet
Gets the sleet-condition weight.
public float Sleet { get; }
Property Value
Snowy
Gets the snowy-condition weight.
public float Snowy { get; }
Property Value
Stormy
Gets the stormy-condition weight.
public float Stormy { get; }
Property Value
Sunny
Gets the sunny-condition weight.
public float Sunny { get; }
Property Value
Windy
Gets the windy-condition weight.
public float Windy { get; }
Property Value
Methods
Equals(WeatherState)
public bool Equals(WeatherState other)
Parameters
otherWeatherState
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
Operators
operator ==(WeatherState, WeatherState)
Determines whether two weather snapshots have the same component values.
public static bool operator ==(WeatherState left, WeatherState right)
Parameters
leftWeatherStateThe first weather snapshot.
rightWeatherStateThe second weather snapshot.
Returns
operator !=(WeatherState, WeatherState)
Determines whether two weather snapshots have different component values.
public static bool operator !=(WeatherState left, WeatherState right)
Parameters
leftWeatherStateThe first weather snapshot.
rightWeatherStateThe second weather snapshot.