Skip to content

KernelAPI reference

Class Engine

Namespace: MicroEngine.Kernel
Assembly: MicroEngine.Kernel.dll
Guide: Modules and the frame schedule

A composed engine: its services, its fixed frame schedule, its clock, its events and its capabilities. A loop (the game runner, a host, a test) drives it frame by frame: it advances Clock and runs the phases in order.

C#
public sealed class Engine

Inheritance

object ← Engine

Properties

Capabilities

The declared optional features.

C#
public CapabilityRegistry Capabilities { get; }

Property Value

CapabilityRegistry

Clock

The loop’s clock, following the engine’s TimeSettings.

C#
public FrameClock Clock { get; }

Property Value

FrameClock

Lifecycle

The engine’s events; the loop and hosts raise them.

C#
public EngineLifecycle Lifecycle { get; }

Property Value

EngineLifecycle

Log

The engine’s log (ILog service).

C#
public ILog Log { get; }

Property Value

ILog

Schedule

The frame systems; fixed (IsFrozen).

C#
public FrameSchedule Schedule { get; }

Property Value

FrameSchedule

Services

The services registered by the modules.

C#
public ServiceRegistry Services { get; }

Property Value

ServiceRegistry

Time

The time policy the engine was built with.

C#
public TimeSettings Time { get; }

Property Value

TimeSettings

Methods

Run(FramePhase, in FrameContext)

Runs the systems of phase with context.

C#
public void Run(FramePhase phase, in FrameContext context)

Parameters

phase FramePhase

context FrameContext

RunFixedStep(in FrameContext)

Runs the four fixed phases, in order, for one step: PreFixed, FixedUpdate, Physics, PostFixed.

C#
public void RunFixedStep(in FrameContext step)

Parameters

step FrameContext

TryGetCapability<T>(out T?)

The capability declared as T, if there is one.

C#
public bool TryGetCapability<T>(out T? capability) where T : class

Parameters

capability T?

Returns

bool

Type Parameters

T