Ejemplo n.º 1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game game = new Game())
     {
         game.Run();
     }
 }
Ejemplo n.º 2
0
		public UI(Window window, Game game)
		{
			this.window = window;
			this.game = game;
			new Command(window.CloseAfterFrame).Add(new KeyTrigger(Key.Escape, State.Pressed));
			new Command(() => window.SetFullscreen(new Size(1920, 1080))).Add(new KeyTrigger(Key.F));
		}
Ejemplo n.º 3
0
        public MainPage()
        {
            this.InitializeComponent();

            ApplicationView.PreferredLaunchWindowingMode
                = ApplicationViewWindowingMode.PreferredLaunchViewSize;
            ApplicationView.PreferredLaunchViewSize = new Size(800, 600);

            // Used in Ball and Paddle
            CanvasWidth = MyCanvas.Width;
            CanvasHeight = MyCanvas.Height;

            // Create a new game
            game = new Game(MyCanvas);
            game.StartGame();
        }