This is the main type for your game
Inheritance: Microsoft.Xna.Framework.Game
Beispiel #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
        /// This method is invoked when the application has loaded and is ready to run. In this 
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            gamer = new Game1();
            gamer.Run();

            return true;
        }
        // Constructor
        public GamePage()
        {
            InitializeComponent();

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

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

            // Create our OpenGL view, and display it
            Game1.Activity = this;
            var g = new Game1 ();
            SetContentView (g.Window);
            g.Run ();
        }
        protected override void OnCreate(Bundle bundle)
        {
            //base.OnCreate (bundle);
            //Microsoft.Xna.Framework.Game.Activity = this;
            //Game = new WindowsPuzzleVisualizer.Game1();
            //WindowsPuzzleVisualizer.Game1 game = new WindowsPuzzleVisualizer.Game1();
            //game.Run();

            base.OnCreate(bundle);
            Game1.Activity = this;
            var g = new Game1(Assets);
            SetContentView(g.Window);
            g.Run();
        }
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // Fun begins..
            game = new Game1();
            game.Run();
            // create a new window instance based on the screen size
            /*window = new UIWindow (UIScreen.MainScreen.Bounds);

            // If you have defined a view, add it here:
            // window.AddSubview (navigationController.View);

            // make the window visible
            window.MakeKeyAndVisible ();*/

            return true;
        }
Beispiel #7
0
 static void Main()
 {
     using (var game = new Game1())
         game.Run();
 }