Game.UI.InGame.PollutionThreshold
Assembly: Assembly-CSharp
Namespace: Game.UI.InGame
Type: public enum
Base: System.Enum
Summary:
Represents the pollution level thresholds used by the in-game UI. Typically used to control overlays, warnings, or UI elements that show pollution severity. Values are the standard sequential enum values (0..3) and map to increasing levels of pollution intensity.
Fields
-
None
Represents no pollution / a cleared state. Underlying value: 0. -
Low
Represents a low pollution threshold. Underlying value: 1. -
Medium
Represents a medium pollution threshold. Underlying value: 2. -
High
Represents a high pollution threshold. Underlying value: 3.
Properties
- This enum type does not define any custom properties. It inherits the standard Enum behavior from System.Enum (e.g., ToString()).
Constructors
- Enums do not expose constructors in user code. Instances are the named constants defined above.
Methods
- This enum inherits standard members from System.Enum and System.ValueType, for example:
- static Parse / TryParse (to convert from string)
- static GetValues / GetNames
- instance ToString()
- instance HasFlag (from Enum)
Use these inherited methods when you need to convert, inspect, or iterate enum values.
Usage Example
using Game.UI.InGame;
public class PollutionDisplay
{
public void UpdateUI(PollutionThreshold threshold)
{
switch (threshold)
{
case PollutionThreshold.None:
// hide overlay
break;
case PollutionThreshold.Low:
// show low-alert visuals
break;
case PollutionThreshold.Medium:
// show medium-alert visuals
break;
case PollutionThreshold.High:
// show high-alert visuals
break;
}
}
}
// Parsing from a string (example)
if (System.Enum.TryParse<PollutionThreshold>("Medium", out var parsed))
{
// parsed == PollutionThreshold.Medium
}