예제 #1
0
        static void Main()
        {
            int index = 11;
            //int index = Convert.ToInt32(ConfigurationManager.AppSettings["game"]);

            GameDictionary          obj        = new GameDictionary();
            IDictionary <int, Game> dictionary = obj.GetGameDictionary();

            Game game = null;

            try
            {
                game = dictionary[index];
                game.Window.Title   = $"Demo{index}Game";
                game.IsMouseVisible = true;
                game.Run();
            }
            finally
            {
                if (null != game)
                {
                    game.Dispose();
                }
            }
        }
예제 #2
0
        internal static void RunGame()
        {
            int index = 11;

            GameDictionary          obj        = new GameDictionary();
            IDictionary <int, Game> dictionary = obj.GetGameDictionary();

            Game game = dictionary[index];

            game.Window.Title   = $"Demo{index}Game";
            game.IsMouseVisible = true;
            game.Run();
        }
예제 #3
0
        protected override void OnCreate(Bundle bundle)
        {
            int index = 11;

            base.OnCreate(bundle);

            GameDictionary          obj        = new GameDictionary();
            IDictionary <int, Game> dictionary = obj.GetGameDictionary();

            Game game = dictionary[index];

            game.Window.Title   = $"Demo{index}Game";
            game.IsMouseVisible = true;

            SetContentView((View)game.Services.GetService(typeof(View)));
            game.Run();
        }