Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    IGame Interface

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

    public interface IGame
    Name Description
    Properties
    Content

    Gets or sets the ContentManager.

    Context

    Gets the game context.

    DrawInterpolationFactor

    Gets the draw interpolation factor, which is (UpdateTime - DrawTime) / TargetElapsedTime. If IsFixedTimeStep is false, it will be 0 as UpdateTime and DrawTime will be equal.

    DrawTime

    Gets the current draw time.

    GameSystems

    Gets the game components registered by this game.

    GraphicsContext

    Gets the graphics context.

    GraphicsDevice

    Gets the graphics device.

    InactiveSleepTime

    Gets or sets the inactive sleep time.

    IsActive

    Gets a value indicating whether this instance is active.

    IsDrawDesynchronized

    Gets or sets a value indicating whether draw can happen as fast as possible, even when IsFixedTimeStep is set.

    IsFixedTimeStep

    Gets or sets a value indicating whether this instance is fixed time step.

    IsMouseVisible

    Gets or sets a value indicating whether the mouse should be visible.

    IsRunning

    Gets a value indicating whether is running.

    LaunchParameters

    Gets the launch parameters.

    Services

    Gets the service container.

    TargetElapsedTime

    Gets or sets the target elapsed time.

    UpdateTime

    Gets the current game time.

    Window

    Gets the abstract window.

    Events
    Activated

    Occurs when [activated].

    Deactivated

    Occurs when [deactivated].

    Exiting

    Occurs when [exiting].

    WindowCreated

    Occurs when [window created].

    | Improve this Doc View Source

    Properties


    Content

    Gets or sets the ContentManager.

    ContentManager Content { get; }
    Property Value
    Type Description
    ContentManager

    The content manager.


    Context

    Gets the game context.

    GameContext Context { get; }
    Property Value
    Type Description
    GameContext

    The game context.


    DrawInterpolationFactor

    Gets the draw interpolation factor, which is (UpdateTime - DrawTime) / TargetElapsedTime. If IsFixedTimeStep is false, it will be 0 as UpdateTime and DrawTime will be equal.

    float DrawInterpolationFactor { get; }
    Property Value
    Type Description
    System.Single

    The draw interpolation factor.


    DrawTime

    Gets the current draw time.

    GameTime DrawTime { get; }
    Property Value
    Type Description
    GameTime

    The current draw time.


    GameSystems

    Gets the game components registered by this game.

    GameSystemCollection GameSystems { get; }
    Property Value
    Type Description
    GameSystemCollection

    The game components.


    GraphicsContext

    Gets the graphics context.

    GraphicsContext GraphicsContext { get; }
    Property Value
    Type Description
    GraphicsContext

    The graphics context.


    GraphicsDevice

    Gets the graphics device.

    GraphicsDevice GraphicsDevice { get; }
    Property Value
    Type Description
    GraphicsDevice

    The graphics device.


    InactiveSleepTime

    Gets or sets the inactive sleep time.

    TimeSpan InactiveSleepTime { get; set; }
    Property Value
    Type Description
    System.TimeSpan

    The inactive sleep time.


    IsActive

    Gets a value indicating whether this instance is active.

    bool IsActive { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is active; otherwise, false.


    IsDrawDesynchronized

    Gets or sets a value indicating whether draw can happen as fast as possible, even when IsFixedTimeStep is set.

    bool IsDrawDesynchronized { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance allows desychronized drawing; otherwise, false.


    IsFixedTimeStep

    Gets or sets a value indicating whether this instance is fixed time step.

    bool IsFixedTimeStep { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is fixed time step; otherwise, false.


    IsMouseVisible

    Gets or sets a value indicating whether the mouse should be visible.

    bool IsMouseVisible { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the mouse should be visible; otherwise, false.


    IsRunning

    Gets a value indicating whether is running.

    bool IsRunning { get; }
    Property Value
    Type Description
    System.Boolean

    LaunchParameters

    Gets the launch parameters.

    LaunchParameters LaunchParameters { get; }
    Property Value
    Type Description
    LaunchParameters

    The launch parameters.


    Services

    Gets the service container.

    ServiceRegistry Services { get; }
    Property Value
    Type Description
    ServiceRegistry

    The service container.


    TargetElapsedTime

    Gets or sets the target elapsed time.

    TimeSpan TargetElapsedTime { get; set; }
    Property Value
    Type Description
    System.TimeSpan

    The target elapsed time.


    UpdateTime

    Gets the current game time.

    GameTime UpdateTime { get; }
    Property Value
    Type Description
    GameTime

    The current game time.


    Window

    Gets the abstract window.

    GameWindow Window { get; }
    Property Value
    Type Description
    GameWindow

    The window.

    | Improve this Doc View Source

    Events


    Activated

    Occurs when [activated].

    event EventHandler<EventArgs> Activated
    Event Type
    Type Description
    System.EventHandler<System.EventArgs>

    Deactivated

    Occurs when [deactivated].

    event EventHandler<EventArgs> Deactivated
    Event Type
    Type Description
    System.EventHandler<System.EventArgs>

    Exiting

    Occurs when [exiting].

    event EventHandler<EventArgs> Exiting
    Event Type
    Type Description
    System.EventHandler<System.EventArgs>

    WindowCreated

    Occurs when [window created].

    event EventHandler<EventArgs> WindowCreated
    Event Type
    Type Description
    System.EventHandler<System.EventArgs>

    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