Exemple #1
0
        public GamePage(string launchArguments)
        {
            this.InitializeComponent();

            // Create the game.
            _game = XamlGame<Game1>.Create(launchArguments, Window.Current.CoreWindow, this);
        }
Exemple #2
0
 protected override void OnCreate(Bundle bundle)
 {
     base.OnCreate(bundle);
     var g = new Game1();
     SetContentView((View)g.Services.GetService(typeof(View)));
     g.Run();
 }
Exemple #3
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Exemple #4
0
        public GamePage(LaunchActivatedEventArgs args)
        {
            this.InitializeComponent();

            // Create the game.
            _game = XamlGame<Game1>.Create(args, Window.Current.CoreWindow, this);
        }
Exemple #5
0
		public GamePage()
        {
            this.InitializeComponent();

			// Create the game.
			var launchArguments = string.Empty;
            _game = MonoGame.Framework.XamlGame<Game1>.Create(launchArguments, Window.Current.CoreWindow, swapChainPanel);
        }
Exemple #6
0
 protected override void OnCreate(Bundle bundle)
 {
     base.OnCreate(bundle);
     Game1.Activity = this;
     var g = new Game1();
     SetContentView(g.Window);
     g.Run();
 }
Exemple #7
0
        // Constructor
        public GamePage()
        {
            InitializeComponent();

            _game = XamlGame<Game1>.Create("", this);

            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }
Exemple #8
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            var game = new Game1();

            var frameLayout = new FrameLayout(this);
            frameLayout.AddView((View)game.Services.GetService(typeof(View)));
            this.SetContentView(frameLayout);

            //SetContentView(game.Window);
            game.Run(GameRunBehavior.Asynchronous);
        }
Exemple #9
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            Game1.Activity = this;
            var game = new Game1();

            var frameLayout = new FrameLayout(this);
            frameLayout.AddView(game.Window);
            this.SetContentView(frameLayout);

            //SetContentView(game.Window);
            game.Run(GameRunBehavior.Asynchronous);
        }
Exemple #10
0
 public GamePage(string launchArguments)
 {
     _game = XamlGame<Game1>.Create(launchArguments, Window.Current.CoreWindow, this);
 }
Exemple #11
0
 static void Main()
 {
     using (var game = new Game1())
         game.Run();
 }
Exemple #12
0
		public override void FinishedLaunching (UIApplication app)
		{
			// Fun begins..
			game = new Game1();
			game.Run();
		}
Exemple #13
0
 internal static void RunGame()
 {
     game = new Game1();
     game.Run();
 }
Exemple #14
0
		void GamePage_Loaded(object sender, RoutedEventArgs e)
        {
			// We do this here to prevent a deadlock in the initialization of the framework.
            _game = XamlGame<Game1>.Create("", this);
        }
Exemple #15
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
#if OUYA
            Ouya.Console.Api.OuyaFacade.Instance.Init(this, "XXXXXXXXXXXXXX"); // Our UUID dev ID
#endif

            Game1.Activity = this;
            var game = new Game1();

            var frameLayout = new FrameLayout(this);
            frameLayout.AddView(game.Window);
            this.SetContentView(frameLayout);

            //SetContentView(game.Window);
            game.Run(GameRunBehavior.Asynchronous);
        }
 static void Main()
 {
     game = new Game1();
     game.Run();
 }