Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    GameContext Class

    Namespace: Stride.Games
    Assembly: Stride.Games.dll

    Contains context used to render the game (Control for WinForm, a DrawingSurface for WP8...etc.).

    System.Object → GameContext
    Derived from GameContext: GameContext<TK>

    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.

    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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.


    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation