Generated by DocFX

Class Scene

A Scene represents a single game Update/Render loop.

Inheritance
System.Object
Scene
ComposedScene
Inherited Members
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 abstract class Scene

Constructors

| Improve this Doc View Source

Scene()

Creates a new Scene

Declaration
public Scene()
| Improve this Doc View Source

Scene(Game)

Creates a new Scene

Declaration
public Scene(Game game)
Parameters
Type Name Description
Game game

Game instance that will be managing this Scene

Properties

| Improve this Doc View Source

Content

Reference to the Scene's ContentManager

Declaration
public ContentManager Content { get; }
Property Value
Type Description
Microsoft.Xna.Framework.Content.ContentManager
Remarks

This ContentManager is intended to be accessed primarily through the Scene's ResourceCatalog.

| Improve this Doc View Source

ContentLoaded

Whether this Scene has completed content loading

Declaration
public bool ContentLoaded { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

ContentLoadedAsync

Whether this Scene has completed asynchronous content loading

Declaration
public bool ContentLoadedAsync { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Game

Reference to the Game instance that is handling this scene

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

Initialized

Whether this Scene has completed initialization

Declaration
public bool Initialized { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

InitializedAsync

Whether this Scene has completed asynchronous initialization

Declaration
public bool InitializedAsync { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

ResourceCatalog

This Scene's resident ResourceCatalog

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

Services

Contains services registered with this Scene

Declaration
public GameServiceContainer Services { get; }
Property Value
Type Description
Microsoft.Xna.Framework.GameServiceContainer
| Improve this Doc View Source

SpriteBatch

The Scene's default SpriteBatch

Declaration
public SpriteBatch SpriteBatch { get; }
Property Value
Type Description
Microsoft.Xna.Framework.Graphics.SpriteBatch
| Improve this Doc View Source

State

Current SceneState of the Scene

Declaration
public SceneState State { get; }
Property Value
Type Description
SceneState

Methods

| Improve this Doc View Source

Compose()

Begins inline composition of a new Scene

Declaration
public static ComposedScene Compose()
Returns
Type Description
ComposedScene
| Improve this Doc View Source

Compose(Game)

Begins inline composition of a new Scene

Declaration
public static ComposedScene Compose(Game game)
Parameters
Type Name Description
Game game
Returns
Type Description
ComposedScene
| Improve this Doc View Source

Draw(GameTime)

Run when the Scene is drawn

Declaration
protected virtual void Draw(GameTime gameTime)
Parameters
Type Name Description
Microsoft.Xna.Framework.GameTime gameTime
| Improve this Doc View Source

Initialize()

Run when the Scene is Initialized

Declaration
protected virtual void Initialize()
| Improve this Doc View Source

InitializeAsync()

Run when the Scene is initialized asynchronously

Declaration
protected virtual void InitializeAsync()
| Improve this Doc View Source

LoadContent()

Run when content is loaded into the Scene

Declaration
protected virtual void LoadContent()
| Improve this Doc View Source

LoadContentAsync()

Run when content is loaded asynchronously

Declaration
protected virtual void LoadContentAsync()
| Improve this Doc View Source

Pause()

Run when the Scene is paused

Declaration
protected virtual void Pause()
Remarks

To pause the scene, use PauseScene() instead

| Improve this Doc View Source

PauseScene()

Pauses the Scene

Declaration
public void PauseScene()
Remarks

A paused Scene will not execute Update actions, but will still execute Draw actions

| Improve this Doc View Source

Resume()

Run when the scene is unpaused or unsuspended

Declaration
protected virtual void Resume()
Remarks

To resum the scene, use UnpauseScene() or UnsuspendScene() instead

| Improve this Doc View Source

SetGame(Game)

Sets the Game object that will be managing this Scene

Declaration
public void SetGame(Game game)
Parameters
Type Name Description
Game game

Game object that will be managing this Scene

| Improve this Doc View Source

SetInputAction(String, Action<InputActionEventArgs>)

Sets the action to be performed upon a specific input action

Declaration
protected void SetInputAction(string name, Action<InputActionEventArgs> action)
Parameters
Type Name Description
System.String name
System.Action<InputActionEventArgs> action
| Improve this Doc View Source

Stop()

Run when the scene is paused or suspended

Declaration
protected virtual void Stop()
Remarks

To stop the scene, use PauseScene() or SuspendScene() instead

| Improve this Doc View Source

Suspend()

Run when the scene is suspended

Declaration
protected virtual void Suspend()
Remarks

To suspend the scene, use SuspendScene() instead

| Improve this Doc View Source

SuspendScene()

Suspends the Scene

Declaration
public void SuspendScene()
Remarks

A suspended Scene will not execute Update or Draw actions

| Improve this Doc View Source

Unload()

Run when the Scene is unloaded

Declaration
protected virtual void Unload()
Remarks

To unload the scene, use UnloadScene() instead

| Improve this Doc View Source

UnloadScene()

Unloads the Scene, removing it from the Game instance that is managing it

Declaration
public void UnloadScene()
| Improve this Doc View Source

Unpause()

Run when the Scene is unpaused

Declaration
protected virtual void Unpause()
Remarks

To unpause the scene, use UnpauseScene() instead

| Improve this Doc View Source

UnpauseScene()

Unpauses the Scene

Declaration
public void UnpauseScene()
Remarks

Returns the Scene to ACTIVE state, only if state was previously PAUSED

| Improve this Doc View Source

Unsuspend()

Run when the scene is unsuspended

Declaration
protected virtual void Unsuspend()
Remarks

To unsuspend the scene, use UnsuspendScene() instead

| Improve this Doc View Source

UnsuspendScene()

Unsuspends the Scene

Declaration
public void UnsuspendScene()
Remarks

Returns the Scene to ACTIVE state, only if state was previously SUSPENDED

| Improve this Doc View Source

Update(GameTime)

Run each frame when the Scene is updated

Declaration
protected virtual void Update(GameTime gameTime)
Parameters
Type Name Description
Microsoft.Xna.Framework.GameTime gameTime

Events

| Improve this Doc View Source

InitializeAsyncComplete

Asynchronous initialization has completed

Declaration
public event EventHandler InitializeAsyncComplete
Event Type
Type Description
System.EventHandler
| Improve this Doc View Source

InitializeAsyncStart

Asynchronous initialization has started

Declaration
public event EventHandler InitializeAsyncStart
Event Type
Type Description
System.EventHandler
| Improve this Doc View Source

InitializeComplete

Initialization has completed

Declaration
public event EventHandler InitializeComplete
Event Type
Type Description
System.EventHandler
| Improve this Doc View Source

LoadContentAsyncComplete

Asynchronous content loading has completed

Declaration
public event EventHandler LoadContentAsyncComplete
Event Type
Type Description
System.EventHandler
| Improve this Doc View Source

LoadContentAsyncStart

Asynchronous content loading has started

Declaration
public event EventHandler LoadContentAsyncStart
Event Type
Type Description
System.EventHandler
| Improve this Doc View Source

LoadContentComplete

Content loading has completed

Declaration
public event EventHandler LoadContentComplete
Event Type
Type Description
System.EventHandler
| Improve this Doc View Source

Paused

Scene has been paused

Declaration
public event EventHandler Paused
Event Type
Type Description
System.EventHandler
| Improve this Doc View Source

Resumed

The Scene has been unpaused or unsuspended

Declaration
public event EventHandler Resumed
Event Type
Type Description
System.EventHandler
| Improve this Doc View Source

Stopped

The Scene has been paused or suspended

Declaration
public event EventHandler Stopped
Event Type
Type Description
System.EventHandler
| Improve this Doc View Source

Suspended

Scene has been suspended

Declaration
public event EventHandler Suspended
Event Type
Type Description
System.EventHandler
| Improve this Doc View Source

Unloaded

Scene has been unloaded

Declaration
public event EventHandler Unloaded
Event Type
Type Description
System.EventHandler
| Improve this Doc View Source

Unpaused

Scene has been unpaused

Declaration
public event EventHandler Unpaused
Event Type
Type Description
System.EventHandler
| Improve this Doc View Source

Unsuspended

Scene has been unsuspended

Declaration
public event EventHandler Unsuspended
Event Type
Type Description
System.EventHandler