Skip to content

KernelAPI reference

Class WorldClock

Namespace: MicroEngine.Scenes
Assembly: MicroEngine.Scene.dll
Guide: Scenes

A world’s own time: a time scale and freezes (hitstop) on top of the engine’s fixed step. It advances as part of its world’s step (BeginStep), once per step: a world that does not step (paused, under an overlay) consumes no time and no freeze.

C#
public sealed class WorldClock

Inheritance

object ← WorldClock

Constructors

WorldClock()

C#
public WorldClock()

Properties

Delta

Scaled length of the latest step (0 while frozen or at scale 0).

C#
public float Delta { get; }

Property Value

float

FreezeRemaining

Seconds of freeze left. Steps subtract their unscaled length while it is positive, so the last frozen step may leave it slightly below zero (the whole step was frozen); it is not frozen when it is 0 or less.

C#
public float FreezeRemaining { get; }

Property Value

float

Frozen

Whether the next step is frozen.

C#
public bool Frozen { get; }

Property Value

bool

Scale

Multiplies the step (0 pauses, 0.5 is slow motion); 1 by default.

C#
public float Scale { get; set; }

Property Value

float

Exceptions

ArgumentOutOfRangeException

The value is negative.

Time

Scaled seconds this world has advanced (freezes and scale applied).

C#
public double Time { get; }

Property Value

double

Methods

Freeze(float)

Freezes the world for at least seconds of unscaled step time (the longer freeze wins). Hitstop is a freeze.

C#
public void Freeze(float seconds)

Parameters

seconds float

Unfreeze()

Ends a freeze now.

C#
public void Unfreeze()