Example #1
0
        public static void Main(string[] args)
        {
            UserSettings.Local = new UserSettings();
            UserSettings.Local.Load();

            var user = new TrueCraftUser { Username = args[1] };
            var client = new MultiplayerClient(user);
            var game = new TrueCraftGame(client, ParseEndPoint(args[0]));
            game.Run();
            client.Disconnect();
        }
Example #2
0
        // We need to spawn the main thread manually so we can register the assembly resolver
        // and manage apartment state ourselves.
        private static void Main_Thread(string[] args)
        {
            UserSettings.Local = new UserSettings();
            UserSettings.Local.Load();

            var user = new TrueCraftUser {
                Username = args[1]
            };
            var client = new MultiplayerClient(user);
            var game   = new TrueCraftGame(client, ParseEndPoint(args[0]));

            game.Run();
            client.Disconnect();
        }
Example #3
0
        public static void Start(params string[] args)
        {
            var username = args.Length == 0 ? "" : args[0];
            var endpoint = args.Length < 2 ? "127.0.0.1" : args[1];

            UserSettings.Local = new UserSettings();
            UserSettings.Local.Load();

            var user = new TrueCraftUser {
                Username = username
            };
            var client = new MultiPlayerClient(user);
            var game   = new TrueCraftGame(client, ParseEndPoint(endpoint));

            game.Run();
            client.Disconnect();
        }
Example #4
0
        public static void Main(string[] args)
        {
            if (args.Length == 0)
            {
                args = new[] { "127.0.0.1", "-" };
            }

            UserSettings.Local = new UserSettings();
            UserSettings.Local.Load();

            var user = new TrueCraftUser {
                Username = args[1]
            };
            var client = new MultiplayerClient(user);
            var game   = new TrueCraftGame(client, ParseEndPoint(args[0]));

            game.Run();
            client.Disconnect();
        }