GameContext Class
Namespace: Stride.GamesAssembly: Stride.Games.dll
Contains context used to render the game (Control for WinForm, a DrawingSurface for WP8...etc.).
public abstract class GameContext
| Name | Description | |
|---|---|---|
| Fields | ||
| DeviceCreationFlags | The device creation flags that will be used to create the GraphicsDevice. |
|
| InitializeDatabase | Indicate whether the game must initialize the default database when it starts running. |
|
| Properties | ||
| ContextType | Context type of this instance. |
|
| ExitCallback | Gets the exit callback to be called when IsUserManagingRun is true when exiting the game. |
|
| IsUserManagingRun | Indicating whether the user will call the main loop. E.g. Stride is used as a library. |
|
| ProductLocation | Product location of game. TODO: Only used for retrieving game's icon. See ProductName for future refactoring |
|
| RunCallback | Gets the main loop callback to be called when IsUserManagingRun is true. |
|
Fields
DeviceCreationFlags
The device creation flags that will be used to create the GraphicsDevice.
public DeviceCreationFlags DeviceCreationFlags
Field Value
| Type | Description |
|---|---|
| DeviceCreationFlags | The device creation flags. |
InitializeDatabase
Indicate whether the game must initialize the default database when it starts running.
public bool InitializeDatabase
Field Value
| Type | Description |
|---|---|
| System.Boolean |
Properties
ContextType
Context type of this instance.
public AppContextType ContextType { get; protected set; }
Property Value
| Type | Description |
|---|---|
| AppContextType |
ExitCallback
Gets the exit callback to be called when IsUserManagingRun is true when exiting the game.
public Action ExitCallback { get; }
Property Value
| Type | Description |
|---|---|
| System.Action | The run loop. |
IsUserManagingRun
Indicating whether the user will call the main loop. E.g. Stride is used as a library.
public bool IsUserManagingRun { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ProductLocation
Product location of game. TODO: Only used for retrieving game's icon. See ProductName for future refactoring
public static string ProductLocation { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
RunCallback
Gets the main loop callback to be called when IsUserManagingRun is true.
public Action RunCallback { get; }
Property Value
| Type | Description |
|---|---|
| System.Action | The run loop. |