Skip to content

KernelAPI reference

Interface IEngineLifecycle

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

Engine events: the things that happen to a running game from outside its simulation. Raised on the game’s thread, between frames (before the frame that follows them), in the order they happened; handlers run in the order they subscribed.

C#
public interface IEngineLifecycle

FocusChanged

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

C#
event Action<bool>? FocusChanged

Event Type

Action<bool>?

QuitRequested

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

C#
event Action<QuitRequest>? QuitRequested

Event Type

Action<QuitRequest>?

Resized

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

C#
event Action<SurfaceResized>? Resized

Event Type

Action<SurfaceResized>?

Resumed

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

C#
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#
event Action? Suspending

Event Type

Action?