Table of Contents

Class SceneManager

Namespace
MonoEight.Core.Scenes
Assembly
MonoEight.Template.dll

A static manager responsible for registering, storing, and switching between Scenes.

public static class SceneManager
Inheritance
SceneManager
Inherited Members

Properties

ActiveScene

The currently active Scene.

public static Scene? ActiveScene { get; }

Property Value

Scene

Methods

Add(string, Scene)

Adds a Scene to the manager.

public static void Add(string name, Scene scene)

Parameters

name string

The name of the to be added Scene.

scene Scene

The to be added Scene.

Exceptions

ArgumentException

Thrown if a Scene with the same name already exists.

Draw(SpriteBatch)

Draws the ActiveScene.

public static void Draw(SpriteBatch spriteBatch)

Parameters

spriteBatch SpriteBatch

Microsoft.Xna.Framework.Graphics.SpriteBatch

Load(string)

Load a given Scene by name.

public static void Load(string name)

Parameters

name string

The name of the to be loaded Scene.

Exceptions

ArgumentException

Thrown if no Scene is found with the given name.

Update()

Updates the ActiveScene.

public static void Update()