using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
public class Game1 : Core
public Game1() : base(width: 320, height: 240, windowTitle: "NezDemo")
protected override void Initialize()
var myScene = Scene.CreateWithDefaultRenderer(new Color(0, 96, 184));
myScene.SetDesignResolution(400, 240, Scene.SceneResolutionPolicy.ShowAllPixelPerfect);
Screen.SetSize(800, 480);
var backgroundMap = myScene.Content.LoadTiledMap("Content/maps/smw_background.tmx");
var backgroundEntity = myScene.CreateEntity("background");
backgroundEntity.AddComponent(new TiledMapRenderer(backgroundMap, shouldCreateColliders: false));
backgroundEntity.Position = new Vector2(0, -80);
var foregroundMap = myScene.Content.LoadTiledMap("Content/maps/smw_foreground.tmx");
var foregroundEntity = myScene.CreateEntity("foreground");
foregroundEntity.AddComponent(new TiledMapRenderer(foregroundMap, shouldCreateColliders: false));
foregroundEntity.Position = new Vector2(0, -48);
protected override void Update(GameTime gameTime)
if (Keyboard.GetState().IsKeyDown(Keys.Escape))