Beispiel #1
0
        private void Timer1_Tick(object sender, EventArgs e)
        {
            try
            {
                label1.Text       = MainPlace_Info.Player1.mon_Place.place[0].Name + MainPlace_Info.Player1.mon_Place.place[0].Stateof();
                pictureBox1.Image = MainPlace_Info.Player1.mon_Place.place[0].cardImage;
                label2.Text       = MainPlace_Info.Player1.mon_Place.place[1].Name + MainPlace_Info.Player1.mon_Place.place[1].Stateof();
                pictureBox2.Image = MainPlace_Info.Player1.mon_Place.place[1].cardImage;
                label3.Text       = MainPlace_Info.Player1.mon_Place.place[2].Name + MainPlace_Info.Player1.mon_Place.place[2].Stateof();
                pictureBox3.Image = MainPlace_Info.Player1.mon_Place.place[2].cardImage;
                label4.Text       = MainPlace_Info.Player1.mon_Place.place[3].Name + MainPlace_Info.Player1.mon_Place.place[3].Stateof();
                pictureBox4.Image = MainPlace_Info.Player1.mon_Place.place[3].cardImage;
                label5.Text       = MainPlace_Info.Player1.mon_Place.place[4].Name + MainPlace_Info.Player1.mon_Place.place[4].Stateof();
                pictureBox5.Image = MainPlace_Info.Player1.mon_Place.place[4].cardImage;

                label6.Text        = MainPlace_Info.Player2.mon_Place.place[0].Name + MainPlace_Info.Player2.mon_Place.place[0].Stateof();
                pictureBox6.Image  = MainPlace_Info.Player2.mon_Place.place[0].cardImage;
                label7.Text        = MainPlace_Info.Player2.mon_Place.place[1].Name + MainPlace_Info.Player2.mon_Place.place[1].Stateof();
                pictureBox7.Image  = MainPlace_Info.Player2.mon_Place.place[1].cardImage;
                label8.Text        = MainPlace_Info.Player2.mon_Place.place[2].Name + MainPlace_Info.Player2.mon_Place.place[2].Stateof();
                pictureBox8.Image  = MainPlace_Info.Player2.mon_Place.place[2].cardImage;
                label9.Text        = MainPlace_Info.Player2.mon_Place.place[3].Name + MainPlace_Info.Player2.mon_Place.place[3].Stateof();
                pictureBox9.Image  = MainPlace_Info.Player2.mon_Place.place[3].cardImage;
                label10.Text       = MainPlace_Info.Player2.mon_Place.place[4].Name + MainPlace_Info.Player2.mon_Place.place[4].Stateof();
                pictureBox10.Image = MainPlace_Info.Player2.mon_Place.place[4].cardImage;

                textBox1.Text = MainPlace_Info.Player1.Name + "\r\nHP:" + MainPlace_Info.Player1.Hp;
                textBox2.Text = MainPlace_Info.Player2.Name + "\r\nHP:" + MainPlace_Info.Player2.Hp;

                if (MainPlace_Info.GamStateFormMainInfo() == MainPlaceInfo.GameState.Player1Win)
                {
                    WinForm winf = new WinForm(this);
                    winf.label1.Text = MainPlace_Info.Player1.Name + "    Win!!!~";
                    timer1.Enabled   = false;
                    winf.ShowDialog();
                }
                if (MainPlace_Info.GamStateFormMainInfo() == MainPlaceInfo.GameState.Player2Win)
                {
                    WinForm winf = new WinForm(this);
                    winf.label1.Text = MainPlace_Info.Player2.Name + "    Win!!!~";
                    timer1.Enabled   = false;
                    winf.ShowDialog();
                }
            }
            finally
            {
            }
        }
        private void Timer1_Tick(object sender, EventArgs e)
        {
            try
            {
                //刷新怪物场区域
                {
                    label1.Text       = MainPlace_Info.Player1.mon_Place.place[0].GiveCardState() + MainPlace_Info.Player1.mon_Place.place[0].Name;
                    pictureBox1.Image = MainPlace_Info.Player1.mon_Place.place[0].cardImage;
                    label2.Text       = MainPlace_Info.Player1.mon_Place.place[1].GiveCardState() + MainPlace_Info.Player1.mon_Place.place[1].Name;
                    pictureBox2.Image = MainPlace_Info.Player1.mon_Place.place[1].cardImage;
                    label3.Text       = MainPlace_Info.Player1.mon_Place.place[2].GiveCardState() + MainPlace_Info.Player1.mon_Place.place[2].Name;
                    pictureBox3.Image = MainPlace_Info.Player1.mon_Place.place[2].cardImage;
                    label4.Text       = MainPlace_Info.Player1.mon_Place.place[3].GiveCardState() + MainPlace_Info.Player1.mon_Place.place[3].Name;
                    pictureBox4.Image = MainPlace_Info.Player1.mon_Place.place[3].cardImage;
                    label5.Text       = MainPlace_Info.Player1.mon_Place.place[4].GiveCardState() + MainPlace_Info.Player1.mon_Place.place[4].Name;
                    pictureBox5.Image = MainPlace_Info.Player1.mon_Place.place[4].cardImage;

                    label6.Text        = MainPlace_Info.Player2.mon_Place.place[0].GiveCardState() + MainPlace_Info.Player2.mon_Place.place[0].Name;
                    pictureBox6.Image  = MainPlace_Info.Player2.mon_Place.place[0].cardImage;
                    label7.Text        = MainPlace_Info.Player2.mon_Place.place[1].GiveCardState() + MainPlace_Info.Player2.mon_Place.place[1].Name;
                    pictureBox7.Image  = MainPlace_Info.Player2.mon_Place.place[1].cardImage;
                    label8.Text        = MainPlace_Info.Player2.mon_Place.place[2].GiveCardState() + MainPlace_Info.Player2.mon_Place.place[2].Name;
                    pictureBox8.Image  = MainPlace_Info.Player2.mon_Place.place[2].cardImage;
                    label9.Text        = MainPlace_Info.Player2.mon_Place.place[3].GiveCardState() + MainPlace_Info.Player2.mon_Place.place[3].Name;
                    pictureBox9.Image  = MainPlace_Info.Player2.mon_Place.place[3].cardImage;
                    label10.Text       = MainPlace_Info.Player2.mon_Place.place[4].GiveCardState() + MainPlace_Info.Player2.mon_Place.place[4].Name;
                    pictureBox10.Image = MainPlace_Info.Player2.mon_Place.place[4].cardImage;
                }
                //刷新魔法陷阱卡区域
                {
                    MgcPitPicbox1.Image  = MainPlace_Info.Player1.MgcPit_Place.place[0].backSetImage;
                    MgcPitPicbox2.Image  = MainPlace_Info.Player1.MgcPit_Place.place[1].backSetImage;
                    MgcPitPicbox3.Image  = MainPlace_Info.Player1.MgcPit_Place.place[2].backSetImage;
                    MgcPitPicbox4.Image  = MainPlace_Info.Player1.MgcPit_Place.place[3].backSetImage;
                    MgcPitPicbox5.Image  = MainPlace_Info.Player1.MgcPit_Place.place[4].backSetImage;
                    MgcPitPicbox6.Image  = MainPlace_Info.Player2.MgcPit_Place.place[0].backSetImage;
                    MgcPitPicbox7.Image  = MainPlace_Info.Player2.MgcPit_Place.place[1].backSetImage;
                    MgcPitPicbox8.Image  = MainPlace_Info.Player2.MgcPit_Place.place[2].backSetImage;
                    MgcPitPicbox9.Image  = MainPlace_Info.Player2.MgcPit_Place.place[3].backSetImage;
                    MgcPitPicbox10.Image = MainPlace_Info.Player2.MgcPit_Place.place[4].backSetImage;
                }


                textBox1.Text = MainPlace_Info.Player1.Name + "\r\nHP:" + MainPlace_Info.Player1.Hp;
                textBox2.Text = MainPlace_Info.Player2.Name + "\r\nHP:" + MainPlace_Info.Player2.Hp;

                if (MainPlace_Info.GamStateFormMainInfo() == MainPlaceInfo.GameState.Player1Win)
                {
                    WinForm winf = new WinForm(this);
                    winf.label1.Text = MainPlace_Info.Player1.Name + "    Win!!!~";
                    timer1.Enabled   = false;
                    winf.ShowDialog();
                }
                if (MainPlace_Info.GamStateFormMainInfo() == MainPlaceInfo.GameState.Player2Win)
                {
                    WinForm winf = new WinForm(this);
                    winf.label1.Text = MainPlace_Info.Player2.Name + "    Win!!!~";
                    timer1.Enabled   = false;
                    winf.ShowDialog();
                }

                //数据刷新区
                this.MainPlace_Info.GameGoing();
                this.MainPlace_Info.Player1.PlayerRenew();
                this.MainPlace_Info.Player2.PlayerRenew();
                this.MainPlace_Info.Player1.ProcessSelectForm.TextRenew();
                this.MainPlace_Info.Player2.ProcessSelectForm.TextRenew();
            }
            finally
            {
            }
        }