Bagikan melalui


GameComponent Members

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

Public Constructors

Name Description
Public Method GameComponent Initializes a new instance of this class.

Public Properties

Name Description
Public Property Enabled Indicates whether GameComponent.Update should be called when Game.Update is called.
Public Property Game Gets the Game associated with this GameComponent.
Public Property UpdateOrder Indicates the order in which the GameComponent should be updated relative to other GameComponent instances. Lower values are updated first.

Public Methods

Name Description
Public Method Dispose Overloaded. Immediately releases the unmanaged resources used by this object.
Public Method Equals (Inherited from Object.)
Public Method GetHashCode (Inherited from Object.)
Public Method GetType (Inherited from Object.)
Public Method Initialize Called when the GameComponent needs to be initialized.
Public Method ToString (Inherited from Object.)
Public Method Update Called when the GameComponent needs to be updated. Override this method with component-specific update code.

Protected Methods

Name Description
Protected Method Finalize Allows a GameComponent to attempt to free resources and perform other cleanup operations before garbage collection reclaims the GameComponent.
Protected Method MemberwiseClone (Inherited from Object.)
Protected Method OnEnabledChanged Called when the Enabled property changes. Raises the EnabledChanged event.
Protected Method OnUpdateOrderChanged Called when the UpdateOrder property changes. Raises the UpdateOrderChanged event.

Public Events

Name Description
Public Event Disposed Raised when the GameComponent is disposed.
Public Event EnabledChanged Raised when the Enabled property changes.
Public Event UpdateOrderChanged Raised when the UpdateOrder property changes.

See Also

Reference

GameComponent Class
Microsoft.Xna.Framework Namespace