public Sonic4Ep1() { Sonic4Ep1.pInstance = this; AppMain.storePath = System.IO.Directory.GetCurrentDirectory(); var config = XmlStorage.Load(); if (config == null) { config = new Sonic4Save(); } var backup = gs.backup.SSave.CreateInstance(); backup.SetSave(config); XmlStorage.Save(config, false, false); this.graphics = new GraphicsDeviceManager((Game)this); this.graphics.PreferredBackBufferWidth = 480 * 3; this.graphics.PreferredBackBufferHeight = 288 * 3; this.graphics.SupportedOrientations = DisplayOrientation.LandscapeLeft; this.graphics.PreparingDeviceSettings += new EventHandler <PreparingDeviceSettingsEventArgs>(this.graphics_PreparingDeviceSettings); this.graphics.SynchronizeWithVerticalRetrace = true; this.graphics.IsFullScreen = false; this.IsMouseVisible = true; this.Content.RootDirectory = "Content"; this.TargetElapsedTime = TimeSpan.FromSeconds(1d / 60); this.Activated += new EventHandler <EventArgs>(OnActivated); this.Deactivated += new EventHandler <EventArgs>(OnDeactivated); }
static void Main(string[] args) { using (var game = new Sonic4Ep1()) { game.Run(); } }
static void Main(string[] args) { using (var sonic = new Sonic4Ep1()) { sonic.Run(); } }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); var g = new Sonic4Ep1(); SetContentView((View)g.Services.GetService(typeof(View))); g.Run(); }