/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (Game game = new Game()) { game.Run(); } }
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)); }
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(); }