public override void FinishedLaunching(UIApplication application)
        {
            var rect = UIScreen.MainScreen.Bounds;

            JitterPhysicsGame.PreferredSize = new Vector2((float)rect.Width, (float)rect.Height);

            var game = new JitterPhysicsGame();

            game.Run();
        }
Пример #2
0
        public MainPage(LaunchActivatedEventArgs e)
        {
            var ppv    = DisplayInformation.GetForCurrentView().RawPixelsPerViewPixel;
            var bounds = Window.Current.CoreWindow.Bounds;

            JitterPhysicsGame.PreferredSize = new Vector2(
                (float)(bounds.Width * ppv),
                (float)(bounds.Height * ppv));

            game = XamlGame <JitterPhysicsGame> .Create(e, Window.Current.CoreWindow, this);
        }
Пример #3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            Android.Graphics.Rect rect = new Android.Graphics.Rect();
            Window.DecorView.GetWindowVisibleDisplayFrame(rect);
            JitterPhysicsGame.PreferredSize = new Vector2(rect.Width(), rect.Height());

            var game = new JitterPhysicsGame();
            var view = (View)game.Services.GetService(typeof(View));

            SetContentView(view);
            game.Run();
        }