跳到主要内容
版本:0.3.1

Interface IArchetypeRegistry

Namespace: ReadyM.Api.ECS.Worlds
Assembly: ReadyM.Api.dll

Allows registering and modifying entity archetypes in the ECS.

public interface IArchetypeRegistry

Methods

ModifyArchetype(ArchetypeId, Action<EntityBuilderBase>)

Extends an existing entity archetype with additional components.

void ModifyArchetype(ArchetypeId archetypeId, Action<EntityBuilderBase> build)

Parameters

archetypeId ArchetypeId

The identifier of the archetype to modify.

build Action<EntityBuilderBase>

A action for adding components.

RegisterArchetype(Action<EntityBuilderBase>)

Registers a new entity archetype with the configured components.

ArchetypeId RegisterArchetype(Action<EntityBuilderBase> build)

Parameters

build Action<EntityBuilderBase>

An action for adding components.

Returns

ArchetypeId

The identifier of the defined archetype.

  • Methods
    • ModifyArchetype(ArchetypeId, Action<EntityBuilderBase>)
    • RegisterArchetype(Action<EntityBuilderBase>)