Class ArchetypeBuilder
Namespace: ReadyM.Api.ECS.Worlds
Assembly: ReadyM.Api.dll
Builder class for creating archetypes in the ECS (Entity Component System) framework. It allows adding components, tags, and custom filters to define the structure of an archetype.
public class ArchetypeBuilder
Inheritance
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
ArchetypeBuilder()
public ArchetypeBuilder()
Methods
Add<T>()
Adds a component of type T to the archetype builder. The component type must be a value type and implement the IComponent interface.
public ArchetypeBuilder Add<T>() where T : struct, IComponent
Returns
Type Parameters
T
Add<T>(T)
Adds a component of type T with a specific instance to the archetype builder. The component type must be a value type and implement the IComponent interface.
public ArchetypeBuilder Add<T>(T component) where T : struct, IComponent
Parameters
component T
Returns
Type Parameters
T