示例#1
0
文件: Form1.cs 项目: WhyLesS/Rock
        private void timer2_Tick(object sender, EventArgs e)
        {
            a++;
            if (a % 3 == 0 && nut.life)
            {
                textBox1.Text = nut.Strengthen();
            }

            //nut.Defender(sundew);

            if (a % 2 == 0 && sunflower.life)
            {
                textBox1.Text = sunflower.HealSundew(sundew, sun);
            }

            if (a % 2 == 1 && sunflower.life)
            {
                textBox1.Text = sunflower.HealNut(nut, sun);
            }

            if (a % 3 == 1)
            {
                if (sunflower.life)
                {
                    textBox1.Text += sunflower.GetPhotoEating(sun);
                }
                if (sundew.life)
                {
                    textBox1.Text += sundew.GetPhotoEating(sun);
                }
                if (nut.life)
                {
                    textBox1.Text += nut.GetPhotoEating(sun);
                }
            }

            if (sundew.life)
            {
                textBox1.Text = sundew.GetPlotFromHuman(human);
            }

            GameOver();
        }