Game.Objects.StreetLightState
Assembly: Assembly-CSharp
Namespace: Game.Objects
Type: public enum (with [Flags])
Base: System.Enum (underlying type: byte)
Summary:
Represents flag-style states for a street light. Marked with [Flags] so individual bits can be combined. Currently defines a default "None" and a single "TurnedOff" flag. Useful for compact storage and bitwise checks when tracking or synchronizing light states in the game.
Fields
-
None = 0
Represents no state flags set. This is the default value for the enum. -
TurnedOff = 1
Indicates the street light is turned off. As a flags enum, this can be combined with other flags in the future.
Properties
- (none)
This enum does not declare properties. It inherits the standard System.Enum members (e.g., ToString, HasFlag via Enum, etc.).
Constructors
- (none)
Enums do not declare instance constructors. Values are created/assigned by casting or using the defined named constants.
Methods
- (none declared)
No custom methods are defined on this enum. Use standard enum/bitwise operations or System.Enum helper methods (Enum.HasFlag, Enum.Parse, etc.) as needed.
Usage Example
// set a state
StreetLightState state = StreetLightState.TurnedOff;
// check a flag
if ((state & StreetLightState.TurnedOff) != 0)
{
// handle turned-off state
}
// add a flag (if more flags are added later)
state |= StreetLightState.TurnedOff;
// remove a flag
state &= ~StreetLightState.TurnedOff;
// safe check using HasFlag (boxing cost)
if (state.HasFlag(StreetLightState.TurnedOff))
{
// ...
}