コード例 #1
0
        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);
        }
コード例 #2
0
        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();
        }
コード例 #3
0
		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();


		}
コード例 #4
0
        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);
        }