Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    IDrawable Interface

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

    An interface for a drawable game component that is called by the GameBase class.

    public interface IDrawable
    Name Description
    Properties
    DrawOrder

    Gets the draw order relative to other objects. IDrawable objects with a lower value are drawn first.

    Visible

    Gets a value indicating whether the Draw(GameTime) method should be called by Draw(GameTime).

    Methods
    BeginDraw()

    Starts the drawing of a frame. This method is followed by calls to Draw and EndDraw.

    Draw(GameTime)

    Draws this instance.

    EndDraw()

    Ends the drawing of a frame. This method is preceeded by calls to Draw and BeginDraw.

    Events
    DrawOrderChanged

    Occurs when the DrawOrder property changes.

    VisibleChanged

    Occurs when the Visible property changes.

    | Improve this Doc View Source

    Properties


    DrawOrder

    Gets the draw order relative to other objects. IDrawable objects with a lower value are drawn first.

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

    The draw order.


    Visible

    Gets a value indicating whether the Draw(GameTime) method should be called by Draw(GameTime).

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

    true if this drawable component is visible; otherwise, false.

    | Improve this Doc View Source

    Methods


    BeginDraw()

    Starts the drawing of a frame. This method is followed by calls to Draw and EndDraw.

    bool BeginDraw()
    Returns
    Type Description
    System.Boolean

    true if Draw should occur, false otherwise


    Draw(GameTime)

    Draws this instance.

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

    The current timing.


    EndDraw()

    Ends the drawing of a frame. This method is preceeded by calls to Draw and BeginDraw.

    void EndDraw()
    | Improve this Doc View Source

    Events


    DrawOrderChanged

    Occurs when the DrawOrder property changes.

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

    VisibleChanged

    Occurs when the Visible property changes.

    event EventHandler<EventArgs> VisibleChanged
    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