Class Game
Ladybug Game instance
Inheritance
Implements
Inherited Members
Namespace: Ladybug
Assembly: ladybug.dll
Syntax
public class Game : Game, IDisposable
Constructors
| Improve this Doc View SourceGame()
Creates a new Ladybug Game instance
Declaration
public Game()
Fields
| Improve this Doc View SourceSceneList
The list of Scenes being managed by this Game instance
Declaration
protected List<Scene> SceneList
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<Scene> |
Remarks
Use LoadScene<T>() and Ladybug.Game.UnloadScene(Ladybug.Scene) to add and remove Scenes from the list
Properties
| Improve this Doc View SourceGraphicsDeviceManager
The Game instance's resident GraphicsDeviceManager, used by managed scenes for rendering.
Declaration
public GraphicsDeviceManager GraphicsDeviceManager { get; }
Property Value
Type | Description |
---|---|
Microsoft.Xna.Framework.GraphicsDeviceManager |
ResourceCatalog
Game-global Resource Catalog
Declaration
public ResourceCatalog ResourceCatalog { get; }
Property Value
Type | Description |
---|---|
ResourceCatalog |
ThreadManager
This Game instance's resident ThreadManager
Declaration
public ThreadManager ThreadManager { get; }
Property Value
Type | Description |
---|---|
ThreadManager |
Methods
| Improve this Doc View SourceDraw(GameTime)
Renders all Scenes managed by this Game instance which are not Suspended.
Declaration
protected override void Draw(GameTime gameTime)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Xna.Framework.GameTime | gameTime | Time passed since previous Draw |
Overrides
LoadScene(Scene)
Loads a Scene into the Game instance
Declaration
public void LoadScene(Scene scene)
Parameters
Type | Name | Description |
---|---|---|
Scene | scene | Scene to be loaded |
LoadScene<T>()
Creates and Loads a new Scene into the Game instance
Declaration
public void LoadScene<T>()
where T : Scene, new()
Type Parameters
Name | Description |
---|---|
T |
LoadSceneAsync(Scene)
Loads a Scene asynchronously
Declaration
public async void LoadSceneAsync(Scene scene)
Parameters
Type | Name | Description |
---|---|---|
Scene | scene | Scene to be loaded asynchronously |
LoadSceneAsync<T>()
Creates and Loads a new Scene asynchronously
Declaration
public async void LoadSceneAsync<T>()
where T : Scene, new()
Type Parameters
Name | Description |
---|---|
T | Type of Scene to create |
Update(GameTime)
Updates all Scenes managed by this Game instance which are neither Paused nor Suspended.
Declaration
protected override void Update(GameTime gameTime)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Xna.Framework.GameTime | gameTime | Time passed since previous Update |