Skip to content

Game.UI.InGame.RouteSchedule

Assembly: Assembly-CSharp
Namespace: Game.UI.InGame

Type: public enum RouteSchedule

Base: System.Enum

Summary:
Defines the operation schedule options for a route (typically used for transport lines or service routes in the in-game UI). The enum specifies whether a route runs during the day, during the night, or both. The underlying values are integer constants (Day = 0, Night = 1, DayAndNight = 2). This type is used by UI code and game logic to present schedule choices and to test or store a route's active schedule.


Fields

  • Day
    Represents a route that operates during daytime hours. Underlying value: 0.

  • Night
    Represents a route that operates during nighttime hours. Underlying value: 1.

  • DayAndNight
    Represents a route that operates both during day and night. Underlying value: 2.

Properties

  • (None)
    Enums do not define instance properties. Use standard enum operations and System.Enum helpers if needed.

Constructors

  • (None)
    Enums have an implicit default constructor and are value types; do not declare constructors.

Methods

  • (None)
    No methods are defined on this enum. Use System.Enum methods (e.g., ToString, Parse) or standard language features (comparisons, switch) when working with values.

Usage Example

// Simple assignment and comparison
RouteSchedule schedule = RouteSchedule.DayAndNight;

if (schedule == RouteSchedule.Night)
{
    // handle night-only logic
}

// Switch-based logic
switch (schedule)
{
    case RouteSchedule.Day:
        // day-only handling
        break;
    case RouteSchedule.Night:
        // night-only handling
        break;
    case RouteSchedule.DayAndNight:
        // both day and night handling
        break;
}

// Converting from string (e.g., reading from saved data)
if (Enum.TryParse<RouteSchedule>("Night", out var parsedSchedule))
{
    // parsedSchedule == RouteSchedule.Night
}