Skip to main content
Version: 1.0.0

Struct Cell

Namespace: ReadyM.SDK.Archetypes.Core
Assembly: ReadyM.SDK.dll

A scope for one loaded cell of an area, holding what is in it.

[Archetype(true)]
public readonly struct Cell : IScope, IArchetype, IArchetypeQueryable, IEntityShape, IIndexed<FullCellId>

Implements​

IScope, IArchetype, IArchetypeQueryable, IEntityShape, IIndexed<FullCellId>

Inherited Members​

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

Extension Methods​

ArchetypeExtensions.IsValid<Cell>(Cell)

Properties​

FullCellId​

Which cell this is, with its area.

[Index]
public FullCellId FullCellId { get; set; }

Property Value​

FullCellId

IsValid​

public bool IsValid { get; }

Property Value​

bool

MasterClient​

The player whose game simulates what the cell holds, or PlayerId.Invalid while nobody is there.

public PlayerId MasterClient { get; set; }

Property Value​

PlayerId

Methods​

As<T>()​

public T As<T>() where T : struct, IArchetypeQueryable

Returns​

T

Type Parameters​

T

Is<T>()​

public bool Is<T>() where T : struct, IArchetypeQueryable

Returns​

bool

Type Parameters​

T

Keep()​

This entity, which it already is: a loop over this shape hands over the shape itself.

public Cell Keep()

Returns​

Cell

Remarks​

Here so taking something out of a loop reads the same whichever way the loop walks. Whether a shape is walked by chunk follows from what it includes, which the call site cannot see and which changes when an include does.

TryAs<T>(out T)​

public bool TryAs<T>(out T archetype) where T : struct, IArchetypeQueryable

Parameters​

archetype T

Returns​

bool

Type Parameters​

T

Operators​

implicit operator Scope(Cell)​

public static implicit operator Scope(Cell value)

Parameters​

value Cell

Returns​

Scope