Table of Contents

Class SceneHostApplication

Namespace
TileWorld.Engine.Hosting
Assembly
TileWorld.Engine.dll

Hosts a single active engine scene and supports explicit scene switching.

public class SceneHostApplication : IEngineApplication, IHostedEngineApplication
Inheritance
SceneHostApplication
Implements
Inherited Members

Constructors

SceneHostApplication(IEngineScene)

Creates a scene-hosted application with an initial active scene.

public SceneHostApplication(IEngineScene initialScene)

Parameters

initialScene IEngineScene

The initial scene to activate during initialization.

Properties

ActiveScene

Gets the currently active scene.

public IEngineScene ActiveScene { get; }

Property Value

IEngineScene

HostServices

Gets the host services injected by the active runtime backend.

public IEngineHostServices HostServices { get; }

Property Value

IEngineHostServices

Methods

Initialize()

Initializes the application and any owned engine systems.

public virtual void Initialize()

Render(IRenderContext)

Draws the current frame into the supplied render context.

public virtual void Render(IRenderContext renderContext)

Parameters

renderContext IRenderContext

The render context exposed by the active host backend.

SetHostServices(IEngineHostServices)

Supplies host services that remain valid for the lifetime of the application instance.

public void SetHostServices(IEngineHostServices hostServices)

Parameters

hostServices IEngineHostServices

The host services exposed by the active runtime backend.

Shutdown()

Shuts the application down and releases owned resources.

public virtual void Shutdown()

SwitchScene(IEngineScene)

Replaces the current active scene with a new scene.

public void SwitchScene(IEngineScene nextScene)

Parameters

nextScene IEngineScene

The scene that should become active.

Update(FrameTime, FrameInput)

Advances application state for one frame.

public virtual void Update(FrameTime frameTime, FrameInput input)

Parameters

frameTime FrameTime

The frame timing snapshot supplied by the active host.

input FrameInput

The input snapshot for the current frame.