Generated by DocFX

Class Game

Ladybug Game instance

Inheritance
System.Object
Microsoft.Xna.Framework.Game
Game
Implements
System.IDisposable
Inherited Members
Microsoft.Xna.Framework.Game.Dispose()
Microsoft.Xna.Framework.Game.Dispose(System.Boolean)
Microsoft.Xna.Framework.Game.Exit()
Microsoft.Xna.Framework.Game.ResetElapsedTime()
Microsoft.Xna.Framework.Game.SuppressDraw()
Microsoft.Xna.Framework.Game.RunOneFrame()
Microsoft.Xna.Framework.Game.Run()
Microsoft.Xna.Framework.Game.Run(Microsoft.Xna.Framework.GameRunBehavior)
Microsoft.Xna.Framework.Game.Tick()
Microsoft.Xna.Framework.Game.BeginDraw()
Microsoft.Xna.Framework.Game.EndDraw()
Microsoft.Xna.Framework.Game.BeginRun()
Microsoft.Xna.Framework.Game.EndRun()
Microsoft.Xna.Framework.Game.LoadContent()
Microsoft.Xna.Framework.Game.UnloadContent()
Microsoft.Xna.Framework.Game.Initialize()
Microsoft.Xna.Framework.Game.OnExiting(System.Object, System.EventArgs)
Microsoft.Xna.Framework.Game.OnActivated(System.Object, System.EventArgs)
Microsoft.Xna.Framework.Game.OnDeactivated(System.Object, System.EventArgs)
Microsoft.Xna.Framework.Game.LaunchParameters
Microsoft.Xna.Framework.Game.Components
Microsoft.Xna.Framework.Game.InactiveSleepTime
Microsoft.Xna.Framework.Game.MaxElapsedTime
Microsoft.Xna.Framework.Game.IsActive
Microsoft.Xna.Framework.Game.IsMouseVisible
Microsoft.Xna.Framework.Game.TargetElapsedTime
Microsoft.Xna.Framework.Game.IsFixedTimeStep
Microsoft.Xna.Framework.Game.Services
Microsoft.Xna.Framework.Game.Content
Microsoft.Xna.Framework.Game.GraphicsDevice
Microsoft.Xna.Framework.Game.Window
Microsoft.Xna.Framework.Game.Activated
Microsoft.Xna.Framework.Game.Deactivated
Microsoft.Xna.Framework.Game.Disposed
Microsoft.Xna.Framework.Game.Exiting
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Ladybug
Assembly: ladybug.dll
Syntax
public class Game : Game, IDisposable

Constructors

| Improve this Doc View Source

Game()

Creates a new Ladybug Game instance

Declaration
public Game()

Fields

| Improve this Doc View Source

SceneList

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 Source

GraphicsDeviceManager

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
| Improve this Doc View Source

ResourceCatalog

Game-global Resource Catalog

Declaration
public ResourceCatalog ResourceCatalog { get; }
Property Value
Type Description
ResourceCatalog
| Improve this Doc View Source

ThreadManager

This Game instance's resident ThreadManager

Declaration
public ThreadManager ThreadManager { get; }
Property Value
Type Description
ThreadManager

Methods

| Improve this Doc View Source

Draw(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
Microsoft.Xna.Framework.Game.Draw(Microsoft.Xna.Framework.GameTime)
| Improve this Doc View Source

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

| Improve this Doc View Source

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
| Improve this Doc View Source

LoadSceneAsync(Scene)

Loads a Scene asynchronously

Declaration
public async void LoadSceneAsync(Scene scene)
Parameters
Type Name Description
Scene scene

Scene to be loaded asynchronously

| Improve this Doc View Source

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

| Improve this Doc View Source

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

Overrides
Microsoft.Xna.Framework.Game.Update(Microsoft.Xna.Framework.GameTime)

Implements

System.IDisposable