Skip to content

Game.Tutorials.HealthProblemActivationData

Assembly: Assembly-CSharp
Namespace: Game.Tutorials

Type: struct

Base: System.ValueType
Implements: Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter

Summary:
Data component used by the tutorial system to describe a health-related activation requirement. It specifies which health problem flags are required and how many citizens matching those flags are needed for the tutorial condition to activate. This struct is intended to be used as an ECS component (IComponentData) and as a query parameter for systems that evaluate tutorial activation conditions.


Fields

  • public Game.Citizens.HealthProblemFlags m_Require
    Specifies the health problem flags that are required (flag enum defined in Game.Citizens). This represents one or more health problem categories (for example: sick, injured, etc.) that the tutorial checks for.

  • public int m_RequiredCount
    Number of citizens matching the specified health problem flags required to satisfy the activation condition.

Properties

  • None. This struct exposes public fields and does not define properties.

Constructors

  • public HealthProblemActivationData()
    Implicit parameterless constructor (compiler-provided). Initializes m_Require to its default enum value and m_RequiredCount to 0. You can create an instance using an object initializer to set fields to desired values.

Methods

  • None. The type only holds data and does not implement any methods.

Usage Example

// create and initialize the activation data directly
var activation = new Game.Tutorials.HealthProblemActivationData {
    m_Require = Game.Citizens.HealthProblemFlags.Sick, // example flag
    m_RequiredCount = 10
};

// add to an entity using the EntityManager (example)
var entity = entityManager.CreateEntity(typeof(Game.Tutorials.HealthProblemActivationData));
entityManager.SetComponentData(entity, activation);

// or create entity with the component already set
var entity2 = entityManager.CreateEntity();
entityManager.AddComponentData(entity2, activation);