コード例 #1
0
ファイル: SuperHuman.cs プロジェクト: WhyLesS/First
        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
ファイル: SunFlowerr.cs プロジェクト: WhyLesS/Ag-NH3-2OH
 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;
            }
        }