private void cmdJoin_Click(object sender, EventArgs e) { int id = 0; if (!Join(txtHostName.Text, txtYourIp.Text, out id)) return; Remoting.GameSetting._serverHostName = txtHostName.Text; Player player = new Player(); player._id = id; player._ip = txtYourIp.Text; Remoting.GameSetting._me = player; this.DialogResult = DialogResult.OK; this.Close(); }
private void CreateGame() { //string ip = Setting.GetLocalIp(); Player player = new Player(); player._id = 1; player._ip = "127.0.0.1"; Remoting.GameSetting._server = player; Remoting.GameSetting._me = player; Remoting.GameSetting._players.Add(player); }