Skip to content

Game.Agents.LeisureType

Assembly: Assembly-CSharp
Namespace: Game.Agents

Type: enum

Base: System.Enum (backed by System.Int32)

Summary:
LeisureType enumerates categories of leisure/tourism-related activities or locations used by agents and systems in the game (e.g., AI decision-making, attractions classification, or UI filtering). Each value represents a distinct leisure category that can influence behavior, routing, or statistics collection.


Fields

  • Meals
    Represents dining-related leisure (restaurants, cafés, food stalls).

  • Entertainment
    Represents entertainment venues (cinemas, theatres, performance venues).

  • Commercial
    Represents commercial/leisure related retail or shopping areas.

  • CityIndoors
    Represents indoor city leisure venues (museums, indoor arenas, malls).

  • Travel
    Represents travel-related leisure or transit-based leisure (sightseeing by transport).

  • CityPark
    Represents city park leisure areas (parks, playgrounds).

  • CityBeach
    Represents beach and seaside leisure areas.

  • Attractions
    Represents major attractions (landmarks, theme-park attractions).

  • Relaxation
    Represents relaxation-focused leisure (spas, quiet zones).

  • Sightseeing
    Represents sightseeing-specific activities/points of interest.

  • Count
    Sentinel value representing the number of defined leisure categories. Useful for sizing arrays or iteration limits; not a real leisure category.

Properties

  • This enum type exposes no custom properties. Use the standard enum behaviors (casting to/from int, ToString, HasFlag for flag-style enums if applicable). The underlying numeric values are of type int.

Constructors

  • Enums do not declare constructors in user code. Instances are created by assignment or casting (e.g., LeisureType.Meals or (LeisureType)0).

Methods

  • No custom methods are defined on this enum. Use standard System.Enum methods (e.g., ToString(), Enum.Parse, Enum.TryParse) where needed.

Usage Example

// Example: switch on LeisureType to pick an icon or behavior
void HandleLeisure(LeisureType type)
{
    switch (type)
    {
        case LeisureType.Meals:
            ShowIcon("icon_meals");
            break;
        case LeisureType.CityPark:
            ShowIcon("icon_park");
            break;
        case LeisureType.CityBeach:
            ShowIcon("icon_beach");
            break;
        // handle other cases...
        default:
            ShowIcon("icon_default");
            break;
    }
}

// Example: create arrays sized by LeisureType.Count
int[] visitCounts = new int[(int)LeisureType.Count];
visitCounts[(int)LeisureType.Meals]++;

// Example: iterate all defined leisure types (excluding Count)
for (int i = 0; i < (int)LeisureType.Count; i++)
{
    var t = (LeisureType)i;
    Debug.Log($"Leisure: {t}");
}