跳到主要内容
版本:Next

Struct Spawner

Namespace: OblivionMp.Sdk.Serverside.Archetypes
Assembly: OblivionMp.Sdk.Serverside.dll

A leveled creature spawn point from the game, kept on the server only.

public readonly struct Spawner : IArchetype, IArchetypeQueryable, IEntityShape

Implements​

IArchetype, IArchetypeQueryable, IEntityShape

Inherited Members​

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

Properties​

BaseId​

public NetworkFormId BaseId { get; set; }

Property Value​

NetworkFormId

IsValid​

public bool IsValid { get; }

Property Value​

bool

Level​

public ushort Level { get; set; }

Property Value​

ushort

ParentCellKind​

public ParentCellKind ParentCellKind { get; set; }

Property Value​

ParentCellKind

ParentCellX​

public int ParentCellX { get; set; }

Property Value​

int

ParentCellY​

public int ParentCellY { get; set; }

Property Value​

int

Position​

public Vector3 Position { get; set; }

Property Value​

Vector3

RefId​

public uint RefId { get; set; }

Property Value​

uint

Rotation​

public float Rotation { get; set; }

Property Value​

float

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 Spawner Keep()

Returns​

Spawner

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

  • Properties
    • BaseId
    • IsValid
    • Level
    • ParentCellKind
    • ParentCellX
    • ParentCellY
    • Position
    • RefId
    • Rotation
  • Methods
    • As<T>()
    • Is<T>()
    • Keep()
    • TryAs<T>(out T)