Game.Prefabs.HealthEventType
Assembly: Assembly-CSharp
Namespace: Game.Prefabs
Type: enum
Base: System.Enum
Summary:
Represents the kinds of health-related events that can occur within the game (e.g., to citizens or entities). Typical uses include event dispatching, logging, AI reactions, and gameplay systems that respond to health status changes (disease outbreak handling, injury treatment, or reporting death).
Fields
-
Disease
Represents a disease-related health event. Underlying value: 0. Often used when a citizen or population is affected by contagion/illness. -
Injury
Represents an injury-related health event. Underlying value: 1. Used for accidents or non-fatal physical harm that may require treatment. -
Death
Represents a death event. Underlying value: 2. Used when an entity dies and systems need to react (remove entity, notify services, update statistics).
Properties
- None declared on this enum.
Enums inherit standard members from System.Enum (e.g., ToString(), GetValues(), HasFlag() when applicable).
Constructors
- None declared.
As with all enums, the CLR provides the underlying value-types and no public constructors are defined. Values are assigned via the enum members.
Methods
- None declared on this enum.
Inherited methods from System.Enum / System.ValueType / System.Object are available (ToString(), CompareTo(), GetHashCode(), HasFlag(object) via extension).
Usage Example
using Game.Prefabs;
public void HandleHealthEvent(HealthEventType eventType)
{
switch (eventType)
{
case HealthEventType.Disease:
// Trigger quarantine, increase hospital queue, notify UI
break;
case HealthEventType.Injury:
// Send ambulance, log incident
break;
case HealthEventType.Death:
// Remove citizen, update death counters, spawn grave
break;
}
}
// Creating/assigning
HealthEventType evt = HealthEventType.Injury;
if (evt == HealthEventType.Disease)
{
// special handling...
}