Skip to main content
Version: 1.0.0-preview.42

Velaptor.Scene.ISceneManager

Velaptor​

Velaptor.Scene​

ISceneManager Interface​

Manages scenes by loading and unloading content, updating, and rendering scenes.

public interface ISceneManager :
Velaptor.IUpdatable,
Velaptor.IDrawable,
System.IDisposable

Implements IUpdatable, IDrawable, System.IDisposable

Properties​

CurrentScene​

Gets the current scene.

Velaptor.Scene.IScene? CurrentScene { get; }

Property Value​

IScene

CurrentSceneIndex​

Gets the index of the current scene.

int CurrentSceneIndex { get; }

Property Value​

System.Int32

InActiveScenes​

Gets a list of all the System.Guid's for the scenes that are inactive.

System.Collections.Generic.IReadOnlyCollection<System.Guid> InActiveScenes { get; }

Property Value​

System.Collections.Generic.IReadOnlyCollection<System.Guid>

IsLoaded​

Gets a value indicating whether the scene manager has been loaded.

bool IsLoaded { get; }

Property Value​

System.Boolean

Remarks​

This does not mean that the content in the individual scenes have been loaded.

TotalScenes​

Gets the total number of scenes.

int TotalScenes { get; }

Property Value​

System.Int32

UsesNavigationWrapping​

Gets or sets a value indicating whether navigation wrapping is used when navigating past the first or list scenes.

bool UsesNavigationWrapping { get; set; }

Property Value​

System.Boolean

Methods​

AddScene(IScene, bool)​

Adds the given scene and sets it as active or inactive.

void AddScene(Velaptor.Scene.IScene scene, bool setToActive);

Parameters​

scene IScene

The scene to add.

setToActive System.Boolean

When set to true, the scene being added will be set to active and
all other scenes will bet set to inactive.

AddScene(IScene)​

Adds the given scene.

void AddScene(Velaptor.Scene.IScene scene);

Parameters​

scene IScene

The scene to add.

Remarks​

The scene will not be activated when added using this method.

LoadContent()​

Loads the content for the manager and the current scene.

void LoadContent();

NextScene()​

Moves to the next scene.

void NextScene();

PreviousScene()​

Moves to the previous scene.

void PreviousScene();

RemoveScene(Guid)​

Removes the scene that matches the given sceneId.

void RemoveScene(System.Guid sceneId);

Parameters​

sceneId System.Guid

The ID of the scene to remove.

Resize(SizeU)​

Updates the size of the window for each scene.

void Resize(Velaptor.SizeU size);

Parameters​

size SizeU

The new size.

SceneExists(Guid)​

Returns a value indicating whether a scene exists that matches the given id.

bool SceneExists(System.Guid id);

Parameters​

id System.Guid

The ID of the scene.

Returns​

System.Boolean
true if a scene exists with the given ID.

SetSceneAsActive(Guid)​

Sets a scene that matches the given id to be the active scene.

void SetSceneAsActive(System.Guid id);

Parameters​

id System.Guid

The ID of the scene.

Remarks​

This will set all the other scenes to inactive.

UnloadContent()​

Unloads the scene manager content and added scenes.

void UnloadContent();