跳到主要内容
版本:Next

Struct Time

Namespace: OblivionMP.SDK.Common.Archetypes.Mixins
Assembly: OblivionMP.SDK.Common.dll

The clock of an area.

[ArchetypeMixin(Replication.OwnershipBased)]
[Extends(typeof(Area), "")]
public readonly struct Time : 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​

GameDaysPassed​

The days passed since the game started.

public float GameDaysPassed { get; set; }

Property Value​

float

GameHour​

The hour of the day, 0 to 24.

public float GameHour { get; set; }

Property Value​

float

TimeScale​

How fast game time runs compared to real time.

public float TimeScale { 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 Time Keep()

Returns​

Time

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
    • GameDaysPassed
    • GameHour
    • TimeScale
  • Methods
    • As<T>()
    • Is<T>()
    • Keep()
    • TryAs<T>(out T)