Show / Hide Table of Contents

Class Scene

A Scene represents a single game Update/Render loop.

Inheritance
System.Object
Scene
Namespace: Ladybug.SceneManagement
Assembly: ladybug.dll
Syntax
public class Scene : object

Constructors

Scene(SceneManager)

Declaration
public Scene(SceneManager sceneManager)
Parameters
Type Name Description
SceneManager sceneManager

Fields

spriteBatch

Declaration
protected SpriteBatch spriteBatch
Field Value
Type Description
SpriteBatch

Properties

Content

Reference to the Scene's ContentManager

Each Scene contains its own separate ContentManager so its assets can be individually loaded and unloaded along with the Scene

Declaration
public ContentManager Content { get; }
Property Value
Type Description
ContentManager

ContentLoaded

Declaration
public bool ContentLoaded { get; }
Property Value
Type Description
System.Boolean

ContentLoadedAsync

Declaration
public bool ContentLoadedAsync { get; }
Property Value
Type Description
System.Boolean

Initialized

Declaration
public bool Initialized { get; }
Property Value
Type Description
System.Boolean

InitializedAsync

Declaration
public bool InitializedAsync { get; }
Property Value
Type Description
System.Boolean

SceneManager

Reference to the SceneManager that is handling this scene

Declaration
public SceneManager SceneManager { get; protected set; }
Property Value
Type Description
SceneManager

State

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

Methods

Draw(GameTime)

Declaration
public virtual void Draw(GameTime gameTime)
Parameters
Type Name Description
GameTime gameTime

FirstDraw()

Called before this scene's first Draw. Useful for last-second initialization

Declaration
public virtual void FirstDraw()

FirstUpdate()

Called before this scene's first Update. Useful for last-second initialization.

Declaration
public virtual void FirstUpdate()

Initialize()

Declaration
public virtual void Initialize()

InitializeAsync()

Declaration
public virtual void InitializeAsync()

LoadContent()

Declaration
public virtual void LoadContent()

LoadContentAsync()

Declaration
public virtual void LoadContentAsync()

Pause()

Declaration
public virtual void Pause()

Suspend()

Declaration
public virtual void Suspend()

Unload()

Declaration
public virtual void Unload()

Unpause()

Declaration
public virtual void Unpause()

Unsuspend()

Declaration
public virtual void Unsuspend()

Update(GameTime)

Declaration
public virtual void Update(GameTime gameTime)
Parameters
Type Name Description
GameTime gameTime

Events

InitializeAsyncComplete

Declaration
public event EventHandler InitializeAsyncComplete
Event Type
Type Description
EventHandler

InitializeAsyncStart

Declaration
public event EventHandler InitializeAsyncStart
Event Type
Type Description
EventHandler

InitializeComplete

Declaration
public event EventHandler InitializeComplete
Event Type
Type Description
EventHandler

LoadContentAsyncComplete

Declaration
public event EventHandler LoadContentAsyncComplete
Event Type
Type Description
EventHandler

LoadContentAsyncStart

Declaration
public event EventHandler LoadContentAsyncStart
Event Type
Type Description
EventHandler

LoadContentComplete

Declaration
public event EventHandler LoadContentComplete
Event Type
Type Description
EventHandler

Paused

Declaration
public event EventHandler Paused
Event Type
Type Description
EventHandler

Resumed

The Scene has been Unpaused or Unsuspended

Declaration
public event EventHandler Resumed
Event Type
Type Description
EventHandler

Stopped

The Scene has been Paused or Suspended

Declaration
public event EventHandler Stopped
Event Type
Type Description
EventHandler

Suspended

Declaration
public event EventHandler Suspended
Event Type
Type Description
EventHandler

Unloaded

Declaration
public event EventHandler Unloaded
Event Type
Type Description
EventHandler

Unpaused

Declaration
public event EventHandler Unpaused
Event Type
Type Description
EventHandler

Unsuspended

Declaration
public event EventHandler Unsuspended
Event Type
Type Description
EventHandler
Back to top Generated by DocFX