-
-
Save K4rakara/fdaf85c8d53f5c719e3c52753ea21ec4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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