Game.Events.EventDataTrackingType
Assembly: Assembly-CSharp
Namespace: Game.Events
Type: enum
Base: System.Enum
Summary:
Enumeration used to specify which kind of event-related data is being tracked by the game's event systems. It provides identifiers for different tracked metrics (e.g., damage, casualties, attendants) and includes a sentinel value (Count
) useful for sizing arrays or iteration limits.
Fields
-
Damages
Represents tracking of damage-related data for an event (e.g., structural damage, monetary loss). -
Casualties
Represents tracking of casualty-related data (e.g., number of injured or killed). -
Attendants
Represents tracking of the number of people attending or present at an event. -
Count
Sentinel value representing the number of defined tracking types. Useful as the length when creating arrays or looping over all enum values.
Properties
- (This enum has no properties.)
Constructors
- (Enums do not have constructors in user code.)
Methods
- (This enum defines no methods beyond the standard System.Enum functionality.)
Usage Example
using Game.Events;
public void ProcessEventData(EventDataTrackingType trackingType, int value)
{
switch (trackingType)
{
case EventDataTrackingType.Damages:
// Handle damage value
HandleDamages(value);
break;
case EventDataTrackingType.Casualties:
// Handle casualties value
HandleCasualties(value);
break;
case EventDataTrackingType.Attendants:
// Handle attendants count
HandleAttendants(value);
break;
default:
// Unexpected type (Count is typically not processed as a real type)
break;
}
}
// Example: creating an array sized to the enum's Count
int[] trackedValues = new int[(int)EventDataTrackingType.Count];
trackedValues[(int)EventDataTrackingType.Attendants] = 125;
{{ This enum is typically used as an index/key when storing or aggregating event metrics. The Count entry is important for safe array sizing and for iterating over all valid tracking types without hard-coding the number of enum members. }}