GameSystemBase Class
Namespace: Stride.GamesAssembly: Stride.Games.dll
Base class for a GameSystemBase component.
public abstract class GameSystemBase : ComponentBase, IDisposable, ICollectorHolder, IGameSystemBase, IComponent, IReferencable, IUpdateable, IDrawable, IContentable
Remarks
A GameSystemBase component can be used to
Name | Description | |
---|---|---|
Constructors | ||
GameSystemBase(IServiceRegistry) | Initializes a new instance of the GameSystemBase class. |
|
Properties | ||
Content | Gets the content manager. This value can be null in a mock environment. |
|
DrawOrder | ||
Enabled | ||
Game | Gets the Game associated with this GameSystemBase. This value can be null in a mock environment. |
|
GraphicsDevice | Gets the graphics device. |
|
Services | Gets the services registry. |
|
UpdateOrder | ||
Visible | ||
Methods | ||
BeginDraw() | ||
Draw(GameTime) | ||
EndDraw() | ||
InitGraphicsDeviceService() | ||
Initialize() | ||
LoadContent() | ||
OnDrawOrderChanged(Object, EventArgs) | ||
OnUpdateOrderChanged(Object, EventArgs) | ||
UnloadContent() | ||
Update(GameTime) | ||
Events | ||
DrawOrderChanged | ||
EnabledChanged | ||
UpdateOrderChanged | ||
VisibleChanged | ||
Explicit Interface Implementations | ||
IContentable.LoadContent() | ||
IContentable.UnloadContent() |
Constructors
GameSystemBase(IServiceRegistry)
Initializes a new instance of the GameSystemBase class.
protected GameSystemBase(IServiceRegistry registry)
Parameters
Type | Name | Description |
---|---|---|
IServiceRegistry | registry | The registry. |
Remarks
The GameSystem is expecting the following services to be registered: IGame and IContentManager.
Properties
Content
Gets the content manager. This value can be null in a mock environment.
protected IContentManager Content { get; }
Property Value
Type | Description |
---|---|
IContentManager | The content. |
DrawOrder
public int DrawOrder { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Enabled
public bool Enabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Game
Gets the Game associated with this GameSystemBase. This value can be null in a mock environment.
public GameBase Game { get; }
Property Value
Type | Description |
---|---|
GameBase | The game. |
Remarks
This value can be null
GraphicsDevice
Gets the graphics device.
protected GraphicsDevice GraphicsDevice { get; }
Property Value
Type | Description |
---|---|
GraphicsDevice | The graphics device. |
Services
Gets the services registry.
public IServiceRegistry Services { get; }
Property Value
Type | Description |
---|---|
IServiceRegistry | The services registry. |
UpdateOrder
public int UpdateOrder { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Visible
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
BeginDraw()
public virtual bool BeginDraw()
Returns
Type | Description |
---|---|
System.Boolean |
Draw(GameTime)
public virtual void Draw(GameTime gameTime)
Parameters
Type | Name | Description |
---|---|---|
GameTime | gameTime |
EndDraw()
public virtual void EndDraw()
InitGraphicsDeviceService()
protected void InitGraphicsDeviceService()
Initialize()
public virtual void Initialize()
LoadContent()
protected virtual void LoadContent()
OnDrawOrderChanged(Object, EventArgs)
protected virtual void OnDrawOrderChanged(object source, EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | source | |
System.EventArgs | e |
OnUpdateOrderChanged(Object, EventArgs)
protected virtual void OnUpdateOrderChanged(object source, EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | source | |
System.EventArgs | e |
UnloadContent()
protected virtual void UnloadContent()
Update(GameTime)
public virtual void Update(GameTime gameTime)
Parameters
Type | Name | Description |
---|---|---|
GameTime | gameTime |
Events
DrawOrderChanged
public event EventHandler<EventArgs> DrawOrderChanged
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
EnabledChanged
public event EventHandler<EventArgs> EnabledChanged
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
UpdateOrderChanged
public event EventHandler<EventArgs> UpdateOrderChanged
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
VisibleChanged
public event EventHandler<EventArgs> VisibleChanged
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |
Explicit Interface Implementations
IContentable.LoadContent()
void IContentable.LoadContent()
IContentable.UnloadContent()
void IContentable.UnloadContent()