Skip to content

KernelAPI reference

Class EngineLifecycle

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

The engine’s IEngineLifecycle: subscribers read it through the interface; the loop and hosts raise the events through the Raise methods.

C#
public sealed class EngineLifecycle : IEngineLifecycle

Inheritance

object ← EngineLifecycle

Implements

IEngineLifecycle

Constructors

EngineLifecycle()

C#
public EngineLifecycle()

Methods

RaiseFocusChanged(bool)

Raises FocusChanged.

C#
public void RaiseFocusChanged(bool focused)

Parameters

focused bool

RaiseQuitRequested()

Raises QuitRequested; every handler runs even after a veto.

C#
public bool RaiseQuitRequested()

Returns

bool

True when the game should quit (no handler vetoed).

RaiseResized(SurfaceResized)

Raises Resized.

C#
public void RaiseResized(SurfaceResized size)

Parameters

size SurfaceResized

RaiseResumed()

Raises Resumed.

C#
public void RaiseResumed()

RaiseSuspending()

Raises Suspending.

C#
public void RaiseSuspending()

FocusChanged

The game’s window gained (true) or lost (false) the input focus. Raised by hosts that report it.

C#
public event Action<bool>? FocusChanged

Event Type

Action<bool>?

QuitRequested

Something outside the game asked it to quit; a handler may Veto it.

C#
public event Action<QuitRequest>? QuitRequested

Event Type

Action<QuitRequest>?

Resized

The drawing surface changed size. Raised by hosts that report it.

C#
public event Action<SurfaceResized>? Resized

Event Type

Action<SurfaceResized>?

Resumed

A suspended game came back; raised before its next frame.

C#
public event Action? Resumed

Event Type

Action?

Suspending

The system is taking the game away (a phone app sent to the background); nothing runs until Resumed.

C#
public event Action? Suspending

Event Type

Action?