Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    GameSystemBase Class

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

    Base class for a GameSystemBase component.

    System.Object → DisposeBase → ComponentBase → GameSystemBase
    Derived from GameSystemBase: AudioSystem GameSystem InputSystem ScriptSystem SceneSystem GameWindowRenderer DebugTextSystem GameProfilingSystem EffectSystem GameFontSystem SpriteAnimationSystem StreamingManager UISystem VRDeviceSystem

    public abstract class GameSystemBase : ComponentBase, IDisposable, ICollectorHolder, IGameSystemBase, IComponent, IReferencable, IUpdateable, IDrawable, IContentable
    Remarks

    A GameSystemBase component can be used to

    Name Description
    Constructors
    GameSystemBase(IServiceRegistry)

    Initializes a new instance of the GameSystemBase class.

    Properties
    Content

    Gets the content manager. This value can be null in a mock environment.

    DrawOrder
    Enabled
    Game

    Gets the Game associated with this GameSystemBase. This value can be null in a mock environment.

    GraphicsDevice

    Gets the graphics device.

    Services

    Gets the services registry.

    UpdateOrder
    Visible
    Methods
    BeginDraw()
    Draw(GameTime)
    EndDraw()
    InitGraphicsDeviceService()
    Initialize()
    LoadContent()
    OnDrawOrderChanged(Object, EventArgs)
    OnUpdateOrderChanged(Object, EventArgs)
    UnloadContent()
    Update(GameTime)
    Events
    DrawOrderChanged
    EnabledChanged
    UpdateOrderChanged
    VisibleChanged
    Explicit Interface Implementations
    IContentable.LoadContent()
    IContentable.UnloadContent()
    | Improve this Doc View Source

    Constructors


    GameSystemBase(IServiceRegistry)

    Initializes a new instance of the GameSystemBase class.

    protected GameSystemBase(IServiceRegistry registry)
    Parameters
    Type Name Description
    IServiceRegistry registry

    The registry.

    Remarks

    The GameSystem is expecting the following services to be registered: IGame and IContentManager.

    | Improve this Doc View Source

    Properties


    Content

    Gets the content manager. This value can be null in a mock environment.

    protected IContentManager Content { get; }
    Property Value
    Type Description
    IContentManager

    The content.


    DrawOrder

    public int DrawOrder { get; set; }
    Property Value
    Type Description
    System.Int32

    Enabled

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

    Game

    Gets the Game associated with this GameSystemBase. This value can be null in a mock environment.

    public GameBase Game { get; }
    Property Value
    Type Description
    GameBase

    The game.

    Remarks

    This value can be null


    GraphicsDevice

    Gets the graphics device.

    protected GraphicsDevice GraphicsDevice { get; }
    Property Value
    Type Description
    GraphicsDevice

    The graphics device.


    Services

    Gets the services registry.

    public IServiceRegistry Services { get; }
    Property Value
    Type Description
    IServiceRegistry

    The services registry.


    UpdateOrder

    public int UpdateOrder { get; set; }
    Property Value
    Type Description
    System.Int32

    Visible

    public bool Visible { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Methods


    BeginDraw()

    public virtual bool BeginDraw()
    Returns
    Type Description
    System.Boolean

    Draw(GameTime)

    public virtual void Draw(GameTime gameTime)
    Parameters
    Type Name Description
    GameTime gameTime

    EndDraw()

    public virtual void EndDraw()

    InitGraphicsDeviceService()

    protected void InitGraphicsDeviceService()

    Initialize()

    public virtual void Initialize()

    LoadContent()

    protected virtual void LoadContent()

    OnDrawOrderChanged(Object, EventArgs)

    protected virtual void OnDrawOrderChanged(object source, EventArgs e)
    Parameters
    Type Name Description
    System.Object source
    System.EventArgs e

    OnUpdateOrderChanged(Object, EventArgs)

    protected virtual void OnUpdateOrderChanged(object source, EventArgs e)
    Parameters
    Type Name Description
    System.Object source
    System.EventArgs e

    UnloadContent()

    protected virtual void UnloadContent()

    Update(GameTime)

    public virtual void Update(GameTime gameTime)
    Parameters
    Type Name Description
    GameTime gameTime
    | Improve this Doc View Source

    Events


    DrawOrderChanged

    public event EventHandler<EventArgs> DrawOrderChanged
    Event Type
    Type Description
    System.EventHandler<System.EventArgs>

    EnabledChanged

    public event EventHandler<EventArgs> EnabledChanged
    Event Type
    Type Description
    System.EventHandler<System.EventArgs>

    UpdateOrderChanged

    public event EventHandler<EventArgs> UpdateOrderChanged
    Event Type
    Type Description
    System.EventHandler<System.EventArgs>

    VisibleChanged

    public event EventHandler<EventArgs> VisibleChanged
    Event Type
    Type Description
    System.EventHandler<System.EventArgs>
    | Improve this Doc View Source

    Explicit Interface Implementations


    IContentable.LoadContent()

    void IContentable.LoadContent()

    IContentable.UnloadContent()

    void IContentable.UnloadContent()

    Inherited Members

    ComponentBase.Tags
    ComponentBase.Name
    ComponentBase.Destroy()
    ComponentBase.ICollectorHolder.Collector
    ComponentBase.OnNameChanged()
    ComponentBase.ToString()
    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    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