示例#1
0
        public string KillAll(Human human, Sundew sundew, Sunflower sunflower, Nut nut) //vot
        {
            human.life     = false;
            sundew.life    = false;
            sunflower.life = false;
            nut.life       = false;

            s = "ты убил всех... и что дальше, тебе просто нечего делать...\n";
            return(s);
        }
示例#2
0
 void SOSO(Human human, Sunflower sunflower)
 {
     s            = human.KillSunflower(sunflower);
     label4.Text  = sunflower.HP.ToString();
     label4.Width = 153 * sunflower.HP / 100;
     if (sunflower.HP <= 0 || !sunflower.Life)
     {
         pictureBox3.Dispose();
         label4.Dispose();
         sunflower.Life = false;
     }
 }
示例#3
0
文件: Form1.cs 项目: WhyLesS/Rock
        void HP(Human human, Sundew sundew, Sunflower sunflower, Nut nut)
        {
            human.HP     -= 5;
            sundew.HP    -= 5;
            sunflower.HP -= 5;
            nut.HP       -= 5;
            ShowHP();

            if (human.HP <= 0 || !human.life)
            {
                human.life = false;
                pictureBox4.Dispose();
                label6.Dispose();
                human.HumanGraphics.HP = 0;
            }

            if (sundew.HP <= 0 || !sundew.life)
            {
                pictureBox1.Dispose();
                label2.Dispose();
                sundew.life = false;
                sundew.SundewGraphics.HP = 0;
            }

            if (nut.HP <= 0 || !nut.life)
            {
                pictureBox2.Dispose();
                label3.Dispose();
                label5.Dispose();
                nut.life           = false;
                nut.NutGraphics.hp = 0;
            }

            if (sunflower.HP <= 0 || !sunflower.life)
            {
                pictureBox3.Dispose();
                label4.Dispose();
                sunflower.life = false;
                sunflower.FlowerGraphics.hp = 0;
            }
        }