Table of Contents

Class MEGame

Namespace
MonoEight.Core
Assembly
MonoEight.Template.dll

The core game class that manages the main game loop, rendering pipeline, and engine initialization.

public class MEGame : Game, IDisposable
Inheritance
Game
MEGame
Implements
Derived
Inherited Members
Game.Dispose()
Game.Exit()
Game.ResetElapsedTime()
Game.SuppressDraw()
Game.RunOneFrame()
Game.Run()
Game.Run(GameRunBehavior)
Game.Tick()
Game.BeginDraw()
Game.EndDraw()
Game.BeginRun()
Game.EndRun()
Game.UnloadContent()
Game.LaunchParameters
Game.Components
Game.InactiveSleepTime
Game.MaxElapsedTime
Game.IsActive
Game.IsMouseVisible
Game.TargetElapsedTime
Game.IsFixedTimeStep
Game.Services
Game.Content
Game.GraphicsDevice
Game.Window
Game.Activated
Game.Deactivated
Game.Disposed
Game.Exiting

Remarks

Inherit from this class to create your specific game entry point.

Constructors

MEGame()

protected MEGame()

Methods

Draw(GameTime)

Called when the game should draw a frame.

Draws the Microsoft.Xna.Framework.DrawableGameComponent instances attached to this game. Override this to render your game.

protected override void Draw(GameTime gameTime)

Parameters

gameTime GameTime

A Microsoft.Xna.Framework.GameTime instance containing the elapsed time since the last call to Microsoft.Xna.Framework.Game.Draw(Microsoft.Xna.Framework.GameTime) and the total time elapsed since the game started.

Initialize()

Override this to initialize the game and load any needed non-graphical resources.

Initializes attached Microsoft.Xna.Framework.GameComponent instances and calls Microsoft.Xna.Framework.Game.LoadContent().

protected override void Initialize()

LoadContent()

Override this to load graphical resources required by the game.

protected override void LoadContent()

OnGameInitialize()

Called after the engine systems are initialized but before content is loaded. Override this to register your own scenes or configure window settings.

protected virtual void OnGameInitialize()

OnLoadContent()

Called when the game content is being loaded. Override this to load global assets or fonts.

protected virtual void OnLoadContent()

OnUpdate()

Called every frame after the engine has updated the scene. Override this to add global logic that runs regardless of the scene.

protected virtual void OnUpdate()

Update(GameTime)

Called when the game should update.

Updates the Microsoft.Xna.Framework.GameComponent instances attached to this game. Override this to update your game.

protected override void Update(GameTime gameTime)

Parameters

gameTime GameTime

The elapsed time since the last call to Microsoft.Xna.Framework.Game.Update(Microsoft.Xna.Framework.GameTime).