Example #1
0
        public bool CreateAndConnectToLocalServer(string serverType, string level)
            {
            if (!CreateServer(serverType, level))

                return false;


            coGameConnection client = new Torque_Class_Helper("GameConnection", "ServerConnection").Create();


            client.setConnectArgs(sGlobal["$pref::Player::Name"]);

            client.setJoinPassword(sGlobal["$Client::Password"]);

            string result = client.connectLocal();

            if (result != "")
                {
                client.delete();
                DestroyServer();
                return false;
                }
            return true;
            }