Class ScreenContext
Represents a list of scenes.
Namespace: Evergine.Framework
Assembly: Evergine.Framework.dll
Syntax
public class ScreenContext
Constructors
ScreenContext(params Scene[])
Initializes a new instance of the ScreenContext class.
Declaration
public ScreenContext(params Scene[] scenes)
Parameters
Type | Name | Description |
---|---|---|
Scene[] | scenes | The list of scenes for this ScreenContext. |
ScreenContext(string, params Scene[])
Initializes a new instance of the ScreenContext class.
Declaration
public ScreenContext(string name, params Scene[] scenes)
Parameters
Type | Name | Description |
---|---|---|
string | name | The screen context name. |
Scene[] | scenes | The scene list for this screen context. |
Fields
Behavior
The current ScreenContextBehaviors.
Declaration
public ScreenContextBehaviors Behavior
Field Value
Type | Description |
---|---|
ScreenContextBehaviors |
Remarks
By default, the behavior is set to None.
Properties
Count
Gets the number of scenes contained in the SceneContext.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int | The count. |
this[int]
Gets the Scene located at index i.
Declaration
public Scene this[int i] { get; }
Parameters
Type | Name | Description |
---|---|---|
int | i | The index i. |
Property Value
Type | Description |
---|---|
Scene | The Scene. |
Name
Gets or sets the name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string | The name. |
Methods
Diff(ScreenContext)
Scenes in this context that are not contained in the context passed as a parameter.
Declaration
public IEnumerable<Scene> Diff(ScreenContext context)
Parameters
Type | Name | Description |
---|---|---|
ScreenContext | context | The ScreenContext to compare. |
Returns
Type | Description |
---|---|
IEnumerable<Scene> | The list of different scenes. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Draw(TimeSpan)
Draws each scene.
Declaration
public void Draw(TimeSpan gameTime)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | gameTime | The game time. |
FindScene<T>(bool)
Finds a Scene in this instance with an exact type.
Declaration
public T FindScene<T>(bool isExactType = true) where T : Scene
Parameters
Type | Name | Description |
---|---|---|
bool | isExactType | If set to |
Returns
Type | Description |
---|---|
T | The Scene or null if no Scene with the exact searched type is found. |
Type Parameters
Name | Description |
---|---|
T | The scene type. |
FindScenes<T>(bool)
Finds a Scene list in this instance with an exact type.
Declaration
public T[] FindScenes<T>(bool isExactType = true) where T : Scene
Parameters
Type | Name | Description |
---|---|---|
bool | isExactType | If set to |
Returns
Type | Description |
---|---|
T[] | An array of Scene that match the condition. |
Type Parameters
Name | Description |
---|---|
T | The scene type. |
PauseScenes()
Pauses the scene.
Declaration
public void PauseScenes()
ResumeScenes()
Resumes the scene.
Declaration
public void ResumeScenes()
Update(TimeSpan)
Updates each scene.
Declaration
public void Update(TimeSpan gameTime)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | gameTime | The game time. |