Table of Contents

Interface IDrawable

Namespace
Stride.Games
Assembly
Stride.Games.dll

An interface for a drawable Game Component that is called by the GameBase class.

public interface IDrawable
Extension Methods

Properties

DrawOrder

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

int DrawOrder { get; }

Property Value

int

Visible

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

bool Visible { get; }

Property Value

bool

true if the Game Component is visible and should be drawn; otherwise, false.

Methods

BeginDraw()

Starts the drawing of the Game Component. It prepares the drawable component for rendering and determines whether a following Draw(GameTime) and EndDraw() call should occur.

bool BeginDraw()

Returns

bool

true if Draw(GameTime) should be called; false otherwise.

Draw(GameTime)

Draws the Game Component.

void Draw(GameTime gameTime)

Parameters

gameTime GameTime

The current timing information.

EndDraw()

Ends the drawing of the Game Component.

void EndDraw()

Remarks

This method must be preceeded by calls to Draw(GameTime) and BeginDraw().

Exceptions

GraphicsDeviceException

The Game Device this Game Component is using to draw itself is not in a valid state to end drawing, or it is not available.

Events

DrawOrderChanged

Occurs when the DrawOrder property changes.

event EventHandler<EventArgs> DrawOrderChanged

Event Type

EventHandler<EventArgs>

VisibleChanged

Occurs when the Visible property changes.

event EventHandler<EventArgs> VisibleChanged

Event Type

EventHandler<EventArgs>