コード例 #1
0
ファイル: frmJoin.cs プロジェクト: sakseichek/homm
        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();
        }
コード例 #2
0
ファイル: frmGame.cs プロジェクト: sakseichek/homm
        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);
        }