Skip to content

Game.Events.Ignite

Assembly: Assembly-CSharp (typical for game/mod scripts)
Namespace: Game.Events

Type: struct

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

Summary:
Represents an "ignite" event used by the game's ECS to signal that an entity (m_Event) is attempting to ignite or apply fire to a target entity (m_Target). Carries an intensity value for the ignition and the frame the request was made to allow scheduling/ordering of event processing.


Fields

  • public Entity m_Event
    Entity that represents the source or owner of the ignite event (the initiator of the ignition).

  • public Entity m_Target
    Entity that is the target of the ignition (the object or entity being ignited). This can be Entity.Null if no specific target.

  • public float m_Intensity
    A float indicating the strength or intensity of the ignition (e.g., how strongly the target should catch fire). Range/scale is contextual to the game logic.

  • public uint m_RequestFrame
    Frame index (unsigned int) when the ignition request was issued. Useful for ordering, de-duplication, or delaying processing until the correct frame.

Properties

  • (none)
    This is a plain struct with public fields; there are no encapsulated properties.

Constructors

  • public Ignite() (default)
    The struct relies on the default parameterless constructor generated by the runtime. Initialize fields using an object initializer or by assigning them directly.

Methods

  • (none)
    No methods are defined on this struct. Use systems and EntityManager/EntityCommandBuffer operations to create, add, query, and process instances.

Usage Example

// Creating and attaching an Ignite event component to an entity (immediate)
var ignite = new Game.Events.Ignite
{
    m_Event = sourceEntity,
    m_Target = targetEntity,
    m_Intensity = 0.8f,
    m_RequestFrame = (uint)UnityEngine.Time.frameCount
};

entityManager.AddComponentData(eventEntity, ignite);

// Using an EntityCommandBuffer in a system (deferred)
ecb.AddComponent(eventEntity, ignite);

// Querying and processing ignite events in a system
Entities
    .WithName("ProcessIgniteEvents")
    .ForEach((ref Game.Events.Ignite igniteEvent) =>
    {
        // Example processing logic:
        // - check igniteEvent.m_RequestFrame
        // - apply effects to igniteEvent.m_Target based on igniteEvent.m_Intensity
    }).Schedule();