public MainPage(String token = null) { InitializeComponent(); // Capture controlls Keyboard.RootControl = this; Mouse.RootControl = this; // Social connect SocialController.Setup(); if (!String.IsNullOrWhiteSpace(token)) { SocialController.Connect(token); } // Create game game = new PeasGame(App.Current.IsRunningOutOfBrowser, 1280, 720); game.Attach(LayoutRoot); // Makes sure to redraw game.IsFixedTimeStep = false; // Make resizable this.SizeChanged += new SizeChangedEventHandler(MainPage_SizeChanged); }
protected override void SetupMainPage(MainPage mainPage) { //FontSource fontSource = new FontSource(Application.GetResourceStream( // new Uri("/<ASSEMBLY NAME>;component/<PATH TO TTF>/<TTF FILENAME>", UriKind.Relative)).Stream); //FontFamily fontFamily = new FontFamily("<FONT FACE>"); var game = new PeasGame(); mainPage.Children.Add(game); game.Play(); }
public MainPage(String token = null) { InitializeComponent(); // Capture controlls Keyboard.RootControl = this; Mouse.RootControl = this; // Social connect SocialController.Setup(); if (!String.IsNullOrWhiteSpace(token)) SocialController.Connect(token); // Create game game = new PeasGame(App.Current.IsRunningOutOfBrowser, 1280, 720); game.Attach(LayoutRoot); // Makes sure to redraw game.IsFixedTimeStep = false; // Make resizable this.SizeChanged += new SizeChangedEventHandler(MainPage_SizeChanged); }