Class SceneManager
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
Methods
Add(string, Scene)
Adds a Scene to the manager.
public static void Add(string name, Scene scene)
Parameters
Exceptions
- ArgumentException
Thrown if a Scene with the same
namealready exists.
Draw(SpriteBatch)
Draws the ActiveScene.
public static void Draw(SpriteBatch spriteBatch)
Parameters
spriteBatchSpriteBatchMicrosoft.Xna.Framework.Graphics.SpriteBatch
Load(string)
Load a given Scene by name.
public static void Load(string name)
Parameters
Exceptions
- ArgumentException
Thrown if no Scene is found with the given
name.
Update()
Updates the ActiveScene.
public static void Update()