A stealth-based 2D platformer where you don't have to kill anyone unless you want to. https://www.semicolin.games
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.2 KiB

  1. using Microsoft.Xna.Framework;
  2. using Windows.Foundation;
  3. using Windows.UI.ViewManagement;
  4. namespace SemiColinGames {
  5. public class UwpDisplay : IDisplay {
  6. private GraphicsDeviceManager graphics;
  7. public void Initialize(GameWindow window, GraphicsDeviceManager graphics) {
  8. this.graphics = graphics;
  9. SetFullScreen(true);
  10. }
  11. public void SetFullScreen(bool fullScreen) {
  12. graphics.IsFullScreen = fullScreen;
  13. graphics.ApplyChanges();
  14. Debug.WriteLine("display: {0}x{1}, fullscreen={2}",
  15. graphics.PreferredBackBufferWidth,
  16. graphics.PreferredBackBufferHeight,
  17. fullScreen);
  18. }
  19. }
  20. public class UwpSneakGame : SneakGame {
  21. public UwpSneakGame() {
  22. Services.AddService(typeof(IDisplay), new UwpDisplay());
  23. }
  24. }
  25. public static class UwpProgram {
  26. static void Main() {
  27. ApplicationView.PreferredLaunchViewSize = new Size(1920, 1080);
  28. // Could also choose FullScreen here, if we wanted.
  29. ApplicationView.PreferredLaunchWindowingMode =
  30. ApplicationViewWindowingMode.PreferredLaunchViewSize;
  31. var factory = new MonoGame.Framework.GameFrameworkViewSource<UwpSneakGame>();
  32. Windows.ApplicationModel.Core.CoreApplication.Run(factory);
  33. }
  34. }
  35. }