Skip to content

Class WorldEventBufferExtensions ​

Namespace: KenseiECS

World extensions for appending events to EventBuffer<T> components.

csharp
public static class WorldEventBufferExtensions

Inheritance ​

object ← WorldEventBufferExtensions

Inherited Members ​

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Methods ​

AddEvent<T>(World, Entity, T) ​

Append an event to the entity's EventBuffer<T>, adding the component if needed. A list it rents, also for a buffer the entity has without one (Values null), is recorded as the entity's, so a copy of the buffer stored for another entity cannot share it. Under KENSEI_DEBUG a handle that is not alive throws (whether or not the slot's new occupant has a buffer), even while another entity is being destroyed; the entity being destroyed itself is accepted, like in the other entity operations.

csharp
public static void AddEvent<T>(this World world, Entity entity, T value) where T : struct

Parameters ​

world World

entity Entity

value T

Type Parameters ​

T