Example #1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            string levelFile = "";
            if (args.Length > 0)
            {

                levelFile = @"" + args[0];

            }
            else
            {

                levelFile = "level1.xml";

            }

            if (levelFile.Length > 0)
            {
                using (Game1 game = new Game1(levelFile))
                {

                    game.Run();

                }

            }
        }
Example #2
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Example #3
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main()
 {
     using (var game = new Game1())
     {
         game.Run();
     }
 }
Example #4
0
 // ReSharper restore UnusedParameter.Local
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 // ReSharper disable UnusedParameter.Local
 private static void Main(string[] args)
 {
     using (var game = new Game1())
     {
         game.Run();
     }
 }
Example #5
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            int width = 600, height = 600;
            bool inv = false;
            if (args.Length >= 1)
            {
                int offset = 0;
                if (args[0] == "white" || args[0] == "black")
                {
                    inv = args[0] == "white";
                    offset++;
                }

                if (args.Length >= 2)
                {
                    width = height = int.Parse(args[1]);

                    if (args.Length >= 3)
                        height = int.Parse(args[2]);
                }
            }

            using (Game1 game = new Game1(inv, width, height))
            {
                game.Run();
            }
        }
 private void bStart_Click(object sender, EventArgs e)
 {
     //Begin a new game
     ServerEngine si = new ServerEngine(int.Parse(tbPort.Text), 8/*TODO : change*/);
     Game1 game = new Game1(si);
     game.Run();
 }
Example #7
0
 private void btnPlay_Click(object sender, EventArgs e)
 {
     this.Hide();
     DatabaseConnector.GetSettings(Login.PlayerId);
     using (var game = new Game1())
         game.Run();
 }
Example #8
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 /// <param name="args">Have to be there</param>
 public static void Main(string[] args)
 {
     Game1 game;
     using (game = new Game1())
     {
         game.Run();
     }
 }
Example #9
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
         // Carrega o jogo
     }
 }
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			var g = new Game1 ();
			SetContentView (g.Services.GetService<View> ());
			g.Run ();
		}
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     CommandLineArguments options = CommandLineArguments.Parse(args);
     using (Game1 game = new Game1(options.Host, options.Port))
     {
         game.Run();
     }
 }
Example #12
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			var g = new Game1();
			SetContentView((View)g.Services.GetService(typeof(View)));
			g.Run();
		}
Example #13
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			// Create our OpenGL view, and display it
			var g = new Game1 ();
			SetContentView((View)g.Services.GetService(typeof(View)));
			g.Run ();
		}
Example #14
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 public static void Main(string[] args)
 {
     {
         using (var game = new Game1())
         {
             game.Run();
         }
     }
 }
Example #15
0
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         Application.EnableVisualStyles();
         Application.Run(new Login.Form1());
         game.Run();
     }
 }
Example #16
0
        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 ();
        }
Example #17
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
     #if WINDOWS
         if (args.Length > 0 && args[0].Equals("dev")) game.dev = true;
     #endif
         game.Run();
     }
 }
Example #18
0
 public override void FinishedLaunching(MonoMac.Foundation.NSObject notification)
 {
     // Handle a Xamarin.Mac Upgrade
     AppDomain.CurrentDomain.AssemblyResolve += (object sender, ResolveEventArgs a) => {
         if (a.Name.StartsWith ("MonoMac")) {
             return typeof(MonoMac.AppKit.AppKitFramework).Assembly;
         }
         return null;
     };
     game = new Game1 ();
     game.Run ();
 }
Example #19
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 //[STAThread]
 static void Main()
 {
     Game1 game = new Game1();
         game.Run();
        //         System.Threading.Thread t2 =
     //new System.Threading.Thread(() =>
        //            {
        //                Game1 game1 = new Game1();
        //                game1.Run();
        //            });
        //         t2.Start();
 }
Example #20
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);

            game.Run(GameRunBehavior.Asynchronous);
        }
        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 ();
            var g = new Game1();
            SetContentView(g.Services.GetService<View>()); // this is new
            g.Run();
        }
 private void bJoin_Click(object sender, EventArgs e)
 {
     // TODO : better handling of exception
     IPEndPoint server = new IPEndPoint(IPAddress.Parse(tbIp.Text), int.Parse(tbPort.Text));
     try
     {
         ClientEngine ci = new ClientEngine(server);
         Game1 game = new Game1(ci);
         game.Run();
     }
     catch (Exception exception)
     {
         Console.Out.WriteLine(exception.Message);
     }
 }
Example #23
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         Debug.WriteLine("args: {0}", args.Length);
         if (args.Length == 1)
         {
             game.IsClient(true);
         }
         else
         {
             game.IsClient(false);
         }
         game.Run();
     }
 }
Example #24
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            using (Game1 game = new Game1())
            {
                game.Run();
            }

            // Properly close the Socket connection
            if (TCPClient.instance != null)
            {
                if (TCPClient.instance.Connected)
                    TCPClient.instance.Disconnect();

                if (TCPClient.instance.sendloop.IsAlive)
                    TCPClient.instance.sendloop.Abort();
            }
        }
Example #25
0
        static void Main(string[] args)
        {
            //Startup client login form
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            ClientSideMenu loginForm = new ClientSideMenu();
            Application.Run(loginForm);

            if (loginForm.info.answer == 1)
            {
            //Startup game
                using (Game1 game = new Game1())
                {
                    game.Run();
                }
            }
        }
Example #26
0
 public override void FinishedLaunching(MonoMac.Foundation.NSObject notification)
 {
     game = new Game1 ();
     game.Run ();
 }
Example #27
0
		internal static void RunGame ()
		{
			game = new Game1 ();
			game.Run ();
		}
Example #28
0
		internal static void RunGame ()
		{
			game = new Game1 (640, 480, "Test");
			game.Run ();
		}
Example #29
0
        private static void Main(string[] args)
        {
            Game1 g = new Game1();

            g.Run();
            while (false)
            {

                Console.WriteLine("Choose your option:\nFinbonacci\nTyping\nHangman");
                var response = Console.ReadLine();
                switch (response.ToLower())
                {
                    case ("fibonacci"):
                        Console.Clear();
                        fibonacci();
                        break;
                    case ("typing"):
                        Console.Clear();
                        typingGame();
                        break;
                    case ("hangman"):
                        Console.Clear();
                        Console.WriteLine("What's the thing to guess?");
                        var toGuess = Console.ReadLine();
                        hangMan(toGuess);
                        break;
                }
            }
        }
Example #30
0
 static void Main(String[] args)
 {
     using (var game = new Game1())
         game.Run();
 }