Logo Mibo

AdaptiveContext Type

The Update-phase context: everything on AdaptiveFrameContext plus the framework-owned intent queue, AdaptiveContext.Intents — intents are unit -> unit work items deferred to a framework-owned moment (after Update, at the top of the next step, or as background work whose completion returns via post).

The queue is reachable from both phases that defer work: Init through AdaptiveFrameContext (work runs at the startup drain, before the first frame is forced), and Update through this context (work runs at the post drain, after this step's Update). The frame builder must not post: it runs after the post drain, so posted work would run a step late.

Instance members

Instance member Description

this.Context

Full Usage: this.Context

Returns: GameContext

The GameContext the runner owns: the window dimensions and the registered services (IAssets, IInput, custom). Programs read services directly from here in Init and Update — the host registers what it owns and the program pulls the rest; there is no registration ceremony.

Returns: GameContext

this.ExitRequested

Full Usage: this.ExitRequested

Returns: cval<bool>

The exit-request root. Set it to true to make the runner stop — the adaptive counterpart of Cmd.signalExit.

Returns: cval<bool>

this.Intents

Full Usage: this.Intents

Returns: IntentQueue

The intent queue: the single place to post unit -> unit work during Update. Choose the moment by name — IntentQueue.post (after this step's Update, until empty), IntentQueue.postNextFrame (at the top of the next step), or IntentQueue.postTask/postAsync (background work whose completion returns via post). The adaptive counterpart of Cmd.

Returns: IntentQueue

this.Time

Full Usage: this.Time

Returns: cval<GameTime>

The framework-owned time root. The runner writes it at the start of every AdaptiveHeadless.Step (once per fixed sub-step); projections may depend on it (animation, physics, timers).

Returns: cval<GameTime>

this.WindowHeight

Full Usage: this.WindowHeight

Returns: int

Current window height in pixels. Default: 600.

Returns: int

this.WindowWidth

Full Usage: this.WindowWidth

Returns: int

Current window width in pixels. Default: 800.

Returns: int

Type something to start searching.