Skip to content

Game.Events.EventCityEffectTrackingType

Assembly: Assembly-CSharp
Namespace: Game.Events

Type: enum

Base: System.Enum

Summary:
Defines the categories of city-wide effects that the game's event/tracking system can monitor. Typical uses include logging, UI displays, analytics, or triggering game logic based on tracked values such as crime or income. The final member Count commonly serves as a sentinel representing the number of tracked types.


Fields

  • Crime
    Tracks crime-related city effects (e.g., crime rate, policing effects).

  • Happiness
    Tracks citizen happiness or satisfaction related effects.

  • TaxIncome
    Tracks tax income-related effects (city income from taxes).

  • TradeIncome
    Tracks trade income-related effects (income generated from trade/industry).

  • Tourism
    Tracks tourism-related effects (tourist visits, tourism income/effects).

  • Count
    Sentinel value representing the total number of tracking types. Useful for array sizing, loops, or validation.

Properties

  • This enum does not declare properties.
    Enums are value types that expose their underlying integer value via casting; any additional behavior is provided by System.Enum static/helpers.

Constructors

  • Enums do not define explicit public constructors in source.
    The runtime provides a default underlying-value constructor; values are typically assigned by name in the enum declaration and map to integral constants.

Methods

  • The enum itself does not define custom methods. Use standard System.Enum/System.Object members and helpers:
  • ToString() — get the name of the enum value.
  • Enum.GetValues(typeof(EventCityEffectTrackingType)) — iterate all values.
  • Enum.TryParse(...) — parse a string into an enum value.
  • Cast to/from integral types to access underlying integer values.

Usage Example

using Game.Events;

public void HandleTracking(EventCityEffectTrackingType type, float value)
{
    switch (type)
    {
        case EventCityEffectTrackingType.Crime:
            // update crime displays, trigger police response, etc.
            break;
        case EventCityEffectTrackingType.Happiness:
            // update happiness meters, adjust policies, etc.
            break;
        case EventCityEffectTrackingType.TaxIncome:
            // add to budget, log income change, etc.
            break;
        case EventCityEffectTrackingType.TradeIncome:
            // process trade income updates
            break;
        case EventCityEffectTrackingType.Tourism:
            // update tourism stats
            break;
        case EventCityEffectTrackingType.Count:
        default:
            // sentinel or invalid handling
            break;
    }
}

// Iterating all tracking types (excluding Count)
foreach (EventCityEffectTrackingType t in Enum.GetValues(typeof(EventCityEffectTrackingType)))
{
    if (t == EventCityEffectTrackingType.Count) continue;
    // initialize tracking arrays, UI elements, etc.
}