Skip to content

Commit

Permalink
Add missing documentation for DrawableGameComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
AristurtleDev committed May 21, 2024
1 parent 5e55a45 commit a3b8e60
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions MonoGame.Framework/DrawableGameComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
namespace Microsoft.Xna.Framework
{
/// <summary>
/// A drawable object that, when added to the <see cref="Game.Components">Game.Components</see> collection, will
/// have its <see cref="Draw(GameTime)"/> method called when <see cref="Game.Draw(GameTime)">Game.Draw(GameTime)</see>
/// is called.
/// A drawable object that, when added to the <see cref="Game.Components">Game.Components</see> collection of a
/// <see cref="Game"/> instance, will have it's <see cref="Draw(GameTime)">Draw(GameTime)</see> method called when
/// <see cref="Game.Draw(GameTime)">Game.Draw(GameTime)</see> is called.
/// </summary>
/// <remarks>
/// This inherits from <see cref="GameComponent"/> so it's <see cref="GameComponent.Update(GameTime)">Update(GameTime)</see>
/// method will also be called when <see cref="Game.Update(GameTime)">Game.Update(GameTime)</see> is called.
/// </remarks>
public class DrawableGameComponent : GameComponent, IDrawable
{
private bool _initialized;
Expand All @@ -23,7 +27,7 @@ public class DrawableGameComponent : GameComponent, IDrawable
/// </summary>
public Graphics.GraphicsDevice GraphicsDevice
{
get { return this.Game.GraphicsDevice; }
get { return this.Game.GraphicsDevice; }
}

/// <summary>
Expand Down Expand Up @@ -79,6 +83,7 @@ public DrawableGameComponent(Game game)
{
}

/// <inheritdoc />
public override void Initialize()
{
if (!_initialized)
Expand All @@ -88,6 +93,7 @@ public override void Initialize()
}
}

/// <inheritdoc />
protected override void Dispose(bool disposing)
{
if (!_disposed)
Expand Down

0 comments on commit a3b8e60

Please sign in to comment.