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
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
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
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.
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();