Пример #1
0
 public static void Run(GameSpecification specification, GameCartridge gameCartridge, string devContentPath)
 {
     using (var game = new MachinaGame(specification, gameCartridge, new DesktopPlatformContext(), devContentPath))
     {
         game.Run();
     }
 }
Пример #2
0
        public static void Run(GameCartridge cartridge, GameSpecification spec, Activity activity)
        {
            GamePlatform.Set(PlatformType.Android, GetFilesAtContentDirectory_Android, ReadFileInContentDirectory_Android, ReadTextFile_Android);

            // I don't think I need these but they might be useful
            // activity.Window.AddFlags(WindowManagerFlags.Fullscreen);
            // activity.Window.AddFlags(WindowManagerFlags.LayoutInOverscan);

            var game = new MachinaGame(spec, cartridge, new AndroidPlatformContext());
            var view = game.Services.GetService(typeof(View)) as View;

            view.SystemUiVisibility =
                (StatusBarVisibility)(SystemUiFlags.LayoutStable | SystemUiFlags.LayoutHideNavigation | SystemUiFlags.LayoutFullscreen | SystemUiFlags.HideNavigation | SystemUiFlags.Fullscreen | SystemUiFlags.ImmersiveSticky);
            activity.SetContentView(view);
            game.Run();
        }