跳到主要内容
版本:0.3.1

Class EntityBuilderBase

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

public abstract class EntityBuilderBase

Inheritance

objectEntityBuilderBase

Inherited Members

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

Constructors

EntityBuilderBase()

protected EntityBuilderBase()

Methods

Add<T>()

Add a component to the archetype.

public abstract EntityBuilderBase Add<T>() where T : struct, IComponent

Returns

EntityBuilderBase

Type Parameters

T

Type of the component. Must implement IComponent.

Add<T>(in T)

Add a component with a default value to the archetype.

[Obsolete("Default values are ignored on the server-side. Use Add<T>() and set the values manually later.")]
public abstract EntityBuilderBase Add<T>(in T component) where T : struct, IComponent

Parameters

component T

Returns

EntityBuilderBase

Type Parameters

T

Type of the component. Must implement IComponent.