Class ScreenContext
Represents a scenes list.
Inherited Members
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 scene list 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 screenContext. |
Fields
Behavior
The current ScreenContextBehaviors.
Declaration
public ScreenContextBehaviors Behavior
Field Value
Type | Description |
---|---|
ScreenContextBehaviors |
Remarks
By default Behavior is set to None.
Properties
Count
Gets the number of scenes actually 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 parameter.
Declaration
public IEnumerable<Scene> Diff(ScreenContext context)
Parameters
Type | Name | Description |
---|---|---|
ScreenContext | context | The ScreenContext with to compare. |
Returns
Type | Description |
---|---|
IEnumerable<Scene> | The list of difference scenes. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Draw(TimeSpan)
Draws every 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 was 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[] | The array of Scene that match the condition. |
Type Parameters
Name | Description |
---|---|
T | The scene type. |
PauseScenes()
Pauses the scenes.
Declaration
public void PauseScenes()
ResumeScenes()
Resumes the scenes.
Declaration
public void ResumeScenes()
Update(TimeSpan)
Updates every scene.
Declaration
public void Update(TimeSpan gameTime)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | gameTime | The game time. |