IDrawable Interface
Namespace: Stride.GamesAssembly: 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. |
|
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 |
|
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 |
|
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()
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> |