Game.Events.EventJournalCompleted
Assembly: Game
Namespace: Game.Events
Type: struct
Base: System.ValueType
Implements: Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter, Colossal.Serialization.Entities.IEmptySerializable
Summary:
EventJournalCompleted is an empty/tag ECS component used to mark that an event journal has been completed. It contains no payload data — it acts as a marker for systems and queries to detect or react to the "event journal completed" condition. The struct is annotated with StructLayout(LayoutKind.Sequential, Size = 1) to ensure it occupies at least one byte (useful for serialization/interop and avoiding zero-sized type issues).
Fields
- This struct defines no instance fields. It is intentionally empty and used as a marker/tag component. {{ This empty struct intentionally contains no fields; it exists solely as a query/marker component for ECS systems. }}
Properties
- This struct exposes no properties. {{ Because this is a pure marker component, there are no properties to read or write. }}
Constructors
- Implicit default constructor: public EventJournalCompleted() {{ As a value type (struct), EventJournalCompleted has the implicit parameterless constructor which initializes the instance. No explicit constructors are defined in the source. }}
Methods
- This struct defines no methods. {{ It implements marker interfaces (IComponentData, IQueryTypeParameter, IEmptySerializable) that do not require additional members to be implemented here. }}
Usage Example
// Add the marker to an entity (signal that the journal is completed)
entityManager.AddComponentData(entity, new Game.Events.EventJournalCompleted());
// Remove it after processing
entityManager.RemoveComponent<Game.Events.EventJournalCompleted>(entity);
// Query for entities that have the marker
Entities
.WithAll<Game.Events.EventJournalCompleted>()
.ForEach((Entity e) =>
{
// handle completed event journal...
// then clear the marker if appropriate:
EntityManager.RemoveComponent<Game.Events.EventJournalCompleted>(e);
}).Schedule();
// Alternatively in code that checks a single entity
if (entityManager.HasComponent<Game.Events.EventJournalCompleted>(entity))
{
// process completion
}
{{ Typical usage is as a transient/tag component: systems add it to signal completion, other systems detect and respond (and often remove the tag afterwards). The IEmptySerializable marker indicates the component participates in the game's serialization pipeline as an empty/marker component. }}