Пример #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main()
 {
     using (var game = new Game1())
     {
         game.Run();
     }
 }
Пример #2
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
Пример #3
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();

                }

            }
        }
Пример #4
0
 private void btnPlay_Click(object sender, EventArgs e)
 {
     this.Hide();
     DatabaseConnector.GetSettings(Login.PlayerId);
     using (var game = new Game1())
         game.Run();
 }
Пример #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();
 }
Пример #7
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();
     }
 }
 /// <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();
     }
 }
Пример #9
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			var g = new Game1 ();
			SetContentView (g.Services.GetService<View> ());
			g.Run ();
		}
Пример #10
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			var g = new Game1();
			SetContentView((View)g.Services.GetService(typeof(View)));
			g.Run();
		}
Пример #11
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();
     }
 }
Пример #12
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
     }
 }
Пример #13
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 public static void Main(string[] args)
 {
     {
         using (var game = new Game1())
         {
             game.Run();
         }
     }
 }
Пример #14
0
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         Application.EnableVisualStyles();
         Application.Run(new Login.Form1());
         game.Run();
     }
 }
Пример #15
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 ();
		}
Пример #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 ();
        }
Пример #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();
     }
 }
Пример #18
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();
 }
Пример #19
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);
        }
Пример #20
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 ();
 }
        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);
     }
 }
Пример #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();
     }
 }
Пример #24
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();
                }
            }
        }
Пример #25
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();
            }
        }
Пример #26
0
 internal static void RunGame()
 {
     game = new Game1();
     game.Run();
 }
Пример #27
0
		internal static void RunGame ()
		{
			game = new Game1 ();
			game.Run ();
		}
Пример #28
0
		internal static void RunGame ()
		{
			game = new Game1 (640, 480, "Test");
			game.Run ();
		}
Пример #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;
                }
            }
        }
Пример #30
0
 static void Main(String[] args)
 {
     using (var game = new Game1())
         game.Run();
 }
Пример #31
0
 public override void FinishedLaunching(MonoMac.Foundation.NSObject notification)
 {
     game = new Game1 ();
     game.Run ();
 }
Пример #32
0
 static void Main()
 {
     using (var game = new Game1())
         game.Run();
 }