public MainPage()
        {
            InitializeComponent();

            ApplicationView.PreferredLaunchViewSize      = new Size(_width, _height);
            ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize;

            var launchArguments = string.Empty;

            _game = XamlGame <RellowBootstrap> .Create(
                gameConstructor : () => new RellowBootstrap(
                    textFileAssetsLoader: new UWPTextFileImporter(),
                    settingsRepository: new UWPSettingsRepository(),
                    webPageOpener: new UWPWebPageOpener(Window.Current),
                    gameCulture: CultureInfo.CurrentCulture,
                    isPc: true,
                    isFullScreen: false,
                    rateMeUri: new Uri("https://www.microsoft.com/store/apps/9N5JJ68QFBPB"),
                    deviceWidth: _width, deviceHeight: _height),
                window : Window.Current.CoreWindow,
                launchParameters : launchArguments,
                swapChainPanel : swapChainPanel);

            Window.Current.VisibilityChanged += Current_VisibilityChanged;
        }
Exemple #2
0
 static void Main()
 {
     using (var game = new RellowBootstrap(
                textFileAssetsLoader: new WindowsTextFileImporter(),
                settingsRepository: new FileWindowsSettingsRepository("rellow-settings.txt"),
                webPageOpener: new WindowsWebSiteOpener(),
                gameCulture: CultureInfo.CreateSpecificCulture("it-IT"),
                isPc: true,
                isFullScreen: false,
                rateMeUri: new Uri("https://www.fbonizzi.it"),
                deviceWidth: 450, deviceHeight: 800))
     {
         game.Run();
     }
 }
Exemple #3
0
        protected override IFbonizziGame StartGame(CultureInfo gameCulture)
        {
            _game = new RellowBootstrap(
                textFileAssetsLoader: new AndroidTextFileImporter(Assets),
                settingsRepository: new AndroidSettingsRepository(this),
                webPageOpener: new AndroidWebPageOpener(this),
                gameCulture: gameCulture,
                isPc: false,
                isFullScreen: true,
                rateMeUri: new Uri("market://details?id=com.francescobonizzi.rellow"));

            _game.Run();
            SetContentView((View)_game.Services.GetService(typeof(View)));

            return(_game);
        }
Exemple #4
0
 protected override void DisposeGame()
 {
     _game?.Dispose();
     _game = null;
 }