Skip to content

Game.Prefabs.HealthcareParameterData

Assembly: Assembly-CSharp
Namespace: Game.Prefabs

Type: struct

Base: IComponentData, IQueryTypeParameter

Summary:
Component data describing configurable parameters and prefab references used by the healthcare system. This struct is an ECS component (IComponentData) intended to be attached to entities (for example, a global settings entity or prefab entity) so systems can read healthcare-related configuration: references to notification and service prefabs, timing thresholds, penalties, and death-rate tuning via a curve.


Fields

  • public Entity m_HealthcareServicePrefab
    Reference to the healthcare service building prefab (Entity). Used when systems need to spawn or reference the actual healthcare service building prefab (for example to instantiate new facilities or check services).

  • public Entity m_AmbulanceNotificationPrefab
    Entity prefab used to create ambulance-related notifications (e.g., UI or world notifications when an ambulance is dispatched or required).

  • public Entity m_HearseNotificationPrefab
    Entity prefab used to create hearse-related notifications (used when deaths occur and a hearse is needed or dispatched).

  • public Entity m_FacilityFullNotificationPrefab
    Entity prefab used to notify when a healthcare facility is full (triggers UI/logic for overflow handling).

  • public float m_TransportWarningTime
    Time threshold (in seconds) that controls when a transport warning is issued. Typically used to determine when patients waiting for transport warrant a warning or escalate behavior.

  • public float m_NoResourceTreatmentPenalty
    Penalty factor applied when the healthcare system lacks resources to treat patients (affects outcomes such as increased death rate, service efficiency reduction, or similar). Exact application depends on system logic.

  • public float m_BuildingDestoryDeathRate
    Death-rate factor applied when a building is destroyed. Note: field name contains a typo in the source ("Destory"). This value is used to increase mortality in cases where destruction of buildings causes fatalities.

  • public AnimationCurve1 m_DeathRate
    Curve controlling death rate as a function of some input (for example severity, time without treatment, or other normalized parameter). AnimationCurve1 is a game-specific curve type; call its sampling API (e.g., Evaluate) where supported to obtain a death-rate multiplier for a given value.

Properties

  • This type defines no properties.

Constructors

  • public HealthcareParameterData()
    Structs have an implicit parameterless constructor. Typical initialization is done with an object initializer when creating or setting the component (see usage example). When added to an entity without initialization, fields default to zero / Entity.Null / default curve value.

Methods

  • This type defines no methods.

Usage Example

// Example: create a settings entity and attach configured HealthcareParameterData
var em = World.DefaultGameObjectInjectionWorld.EntityManager;
var settingsEntity = em.CreateEntity(typeof(HealthcareParameterData));

// Assume these Entity variables were obtained earlier (prefab entities)
Entity healthcarePrefab = /* ... */;
Entity ambulanceNotif = /* ... */;
Entity hearseNotif = /* ... */;
Entity facilityFullNotif = /* ... */;

// Configure and set the component
var healthcareParams = new HealthcareParameterData
{
    m_HealthcareServicePrefab = healthcarePrefab,
    m_AmbulanceNotificationPrefab = ambulanceNotif,
    m_HearseNotificationPrefab = hearseNotif,
    m_FacilityFullNotificationPrefab = facilityFullNotif,
    m_TransportWarningTime = 60f,               // seconds
    m_NoResourceTreatmentPenalty = 1.5f,        // example penalty multiplier
    m_BuildingDestoryDeathRate = 0.25f,        // 25% additional death rate on destruction
    m_DeathRate = /* initialize AnimationCurve1 appropriately */
};

em.SetComponentData(settingsEntity, healthcareParams);

// Later, sample the curve (pseudocode, depends on AnimationCurve1 API)
// float severity = 0.6f;
// float deathMultiplier = healthcareParams.m_DeathRate.Evaluate(severity);