Bagikan melalui


DrawableGameComponent Members

The following tables list the members exposed by the DrawableGameComponent type.

Public Constructors

Name Description
Public Method DrawableGameComponent Creates a new instance of DrawableGameComponent.

Public Properties

Name Description
Public Property DrawOrder Order in which the component should be drawn, relative to other components that are in the same GameComponentCollection.
Public Property Enabled (Inherited from GameComponent.)
Public Property Game (Inherited from GameComponent.)
Public Property GraphicsDevice The GraphicsDevice the DrawableGameComponent is associated with.
Public Property UpdateOrder (Inherited from GameComponent.)
Public Property Visible Indicates whether Draw should be called.

Public Methods

Name Description
Public Method Dispose Overloaded. Releases the resources used by the DrawableGameComponent class.
Public Method Draw Called when the DrawableGameComponent needs to be drawn. Override this method with component-specific drawing code.
Public Method Equals (Inherited from Object.)
Public Method GetHashCode (Inherited from Object.)
Public Method GetType (Inherited from Object.)
Public Method Initialize Initializes the component. Override this method to load any non-graphics resources and query for any required services.
Public Method ToString (Inherited from Object.)
Public Method Update (Inherited from GameComponent.)

Protected Methods

Name Description
Protected Method Finalize (Inherited from GameComponent.)
Protected Method LoadContent Called when graphics resources need to be loaded. Override this method to load any component-specific graphics resources.
Protected Method MemberwiseClone (Inherited from Object.)
Protected Method OnDrawOrderChanged Called when the DrawOrder property changes. Raises the DrawOrderChanged event.
Protected Method OnEnabledChanged (Inherited from GameComponent.)
Protected Method OnUpdateOrderChanged (Inherited from GameComponent.)
Protected Method OnVisibleChanged Called when the Visible property changes. Raises the VisibleChanged event.
Protected Method UnloadContent Called when graphics resources need to be unloaded. Override this method to unload any component-specific graphics resources.

Public Events

Name Description
Public Event Disposed (Inherited from GameComponent.)
Public Event DrawOrderChanged Raised when the DrawOrder property changes.
Public Event EnabledChanged (Inherited from GameComponent.)
Public Event UpdateOrderChanged (Inherited from GameComponent.)
Public Event VisibleChanged Raised when the Visible property changes.

See Also

Reference

DrawableGameComponent Class
Microsoft.Xna.Framework Namespace