Game.ActivityFlags
Assembly: Assembly-CSharp
Namespace: Game.Prefabs
Type: public enum
Base: System.Enum (underlying type: System.Int32)
Summary:
A bitflags enum used by prefab/activity systems to indicate driving-hand inversion settings for traffic. Marked with [Flags], so values can be combined using bitwise operators. Typically used to specify whether left‑hand or right‑hand traffic inversion is active for a given prefab or activity configuration.
Fields
-
InvertLefthandTraffic = 1
Indicates that left‑hand traffic inversion is enabled (bit 0). When set, the prefab/activity should treat traffic as left‑hand driving. -
InvertRighthandTraffic = 2
Indicates that right‑hand traffic inversion is enabled (bit 1). When set, the prefab/activity should treat traffic as right‑hand driving.
Properties
- None
This enum does not define properties. It is a simple value type representing bitflags.
Constructors
- None (enum)
Enums do not expose user-defined constructors. The underlying storage is a 32‑bit integer; the default value is 0 (no flags set).
Methods
- None
No methods are defined on this enum. Use System.Enum helpers or bitwise operations to manipulate values.
Usage Example
// Set both flags (although in practice only one side of traffic inversion would be meaningful)
ActivityFlags flags = ActivityFlags.InvertLefthandTraffic | ActivityFlags.InvertRighthandTraffic;
// Check if a specific flag is set
bool isLeftHand = (flags & ActivityFlags.InvertLefthandTraffic) == ActivityFlags.InvertLefthandTraffic;
// Clear a flag
flags &= ~ActivityFlags.InvertRighthandTraffic;
// Typical check for any inversion
bool anyInversion = flags != 0;