Game.EndFrameBarrier
Assembly: Assembly-CSharp
Namespace: Game.Routes
Type: enum (byte)
Base: System.Enum (underlying type: System.Byte)
Summary:
This file defines the RouteInfoFlags enumeration used by the routing system to indicate route activation state by time of day. Although not marked with the [Flags] attribute in source, the values are powers of two (1 and 2) so they are suitable for bitwise combination to represent multiple inactive states (e.g., inactive during both day and night). The enum is small (backed by a byte) to keep memory usage low when stored per-route.
Fields
-
InactiveDay = 1
Indicates the route is inactive during daytime. Value is 1 (0x01). -
InactiveNight = 2
Indicates the route is inactive during nighttime. Value is 2 (0x02).
Properties
- (none)
This enum does not declare properties.
Constructors
- (none)
Enums do not declare instance constructors in C#; values are represented by the named constants above. The underlying storage is a byte.
Methods
- (none declared)
No custom methods are defined on this enum. Standard System.Enum methods (ToString, HasFlag, etc.) are available.
Usage Example
// Read a route flag value (example variable)
RouteInfoFlags flags = RouteInfoFlags.InactiveDay | RouteInfoFlags.InactiveNight;
// Check if route is inactive during day
bool inactiveDay = (flags & RouteInfoFlags.InactiveDay) != 0;
// Check if route is inactive during night
bool inactiveNight = (flags & RouteInfoFlags.InactiveNight) != 0;
// Set inactive-night flag
flags |= RouteInfoFlags.InactiveNight;
// Clear inactive-day flag
flags &= ~RouteInfoFlags.InactiveDay;
Notes: - If you plan to store or combine multiple values, you may consider adding the [Flags] attribute for clearer semantics and better integration with Enum methods that format combined values. However, adding attributes is a source-level change and may affect compatibility with other code that parses enum values.