Table of Contents

Struct ComponentSet

Namespace
Ghost.Entities
Assembly
Ghost.Entities.dll

Represents an immutable set of component identifiers used to define a group of components within an entity or system.

public struct ComponentSet : IDisposable, IEquatable<ComponentSet>
Implements
Inherited Members

Constructors

ComponentSet(AllocationHandle, params ReadOnlySpan<Identifier<IComponent>>)

public ComponentSet(AllocationHandle allocationHandle, params ReadOnlySpan<Identifier<IComponent>> components)

Parameters

allocationHandle AllocationHandle
components ReadOnlySpan<Identifier<IComponent>>

ComponentSet(Allocator, params ReadOnlySpan<Identifier<IComponent>>)

public ComponentSet(Allocator allocator, params ReadOnlySpan<Identifier<IComponent>> components)

Parameters

allocator Allocator
components ReadOnlySpan<Identifier<IComponent>>

Properties

Components

public readonly ReadOnlySpan<Identifier<IComponent>> Components { get; }

Property Value

ReadOnlySpan<Identifier<IComponent>>

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Equals(ComponentSet)

Indicates whether the current object is equal to another object of the same type.

public readonly bool Equals(ComponentSet other)

Parameters

other ComponentSet

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override readonly bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Operators

operator ==(ComponentSet, ComponentSet)

public static bool operator ==(ComponentSet left, ComponentSet right)

Parameters

left ComponentSet
right ComponentSet

Returns

bool

operator !=(ComponentSet, ComponentSet)

public static bool operator !=(ComponentSet left, ComponentSet right)

Parameters

left ComponentSet
right ComponentSet

Returns

bool