Skip to content

Instantly share code, notes, and snippets.

@K4rakara
Created May 13, 2020 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save K4rakara/fdaf85c8d53f5c719e3c52753ea21ec4 to your computer and use it in GitHub Desktop.
Save K4rakara/fdaf85c8d53f5c719e3c52753ea21ec4 to your computer and use it in GitHub Desktop.
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using SharpEngine.Utils;
namespace SharpEngine
{
public class SharpContext : Game
{
public Logger logger;
public GraphicsDeviceManager graphics;
public SpriteBatch spriteBatch;
public SharpContext() : base()
{
logger = new Logger();
graphics = new GraphicsDeviceManager(this);
graphics.PreferredBackBufferWidth = 1280;
graphics.PreferredBackBufferHeight = 720;
graphics.ApplyChanges();
Content.RootDirectory = "Content";
}
protected override void Initialize()
{
logger.Log("Initializing...", true);
base.Initialize();
logger.Log("Initialized.", true);
}
protected override void LoadContent()
{
spriteBatch = new SpriteBatch(GraphicsDevice);
}
protected override void Update(GameTime gameTime)
{
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
base.Draw(gameTime);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment