跳到主要内容
版本:Next

Struct ParentCell

Namespace: OblivionMp.Sdk.Common.Archetypes.Mixins
Assembly: OblivionMp.Sdk.Common.dll

The cell an entity is in.

[ArchetypeMixin]
public readonly struct ParentCell : IArchetypeMixin, IArchetypeQueryable, IEntityShape

Implements​

IArchetypeMixin, IArchetypeQueryable, IEntityShape

Inherited Members​

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

Properties​

Kind​

Whether the cell is an interior or an exterior, or Unknown before the game has said.

public ParentCellKind Kind { get; set; }

Property Value​

ParentCellKind

X​

The X coordinate of the exterior grid square.

public int X { get; set; }

Property Value​

int

Y​

The Y coordinate of the exterior grid square.

public int Y { get; set; }

Property Value​

int

Methods​

Keep()​

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

public ParentCell Keep()

Returns​

ParentCell

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.