Beispiel #1
0
        public void MakeZombies()
        {
            PictureBox zombie = new PictureBox();

            zombie.Tag      = "zombie";
            zombie.Image    = Properties.Resources.zdown;
            zombie.Left     = newRnd.Next(0, 900);
            zombie.Top      = newRnd.Next(0, 800);
            zombie.SizeMode = PictureBoxSizeMode.AutoSize; // fit to picture
            this.Controls.Add(zombie);
            Player.BringToFront();
        }
Beispiel #2
0
        public void dropHealth()
        {
            PictureBox healthIcon = new PictureBox();

            healthIcon.Tag      = "health";
            healthIcon.Image    = Properties.Resources.healthIcon;
            healthIcon.Left     = newRnd.Next(10, this.ClientSize.Width - healthIcon.Width);
            healthIcon.Top      = newRnd.Next(10, this.ClientSize.Height - healthIcon.Height);
            healthIcon.SizeMode = PictureBoxSizeMode.AutoSize;
            this.Controls.Add(healthIcon);
            Player.BringToFront();
        }
Beispiel #3
0
        private void dropAmmo() // random pozicija za spawn na ammo
        {
            PictureBox ammo = new PictureBox();

            ammo.Image    = Properties.Resources.ammo_Image;
            ammo.SizeMode = PictureBoxSizeMode.AutoSize;
            ammo.Left     = newRnd.Next(10, this.ClientSize.Width - ammo.Width);
            ammo.Top      = newRnd.Next(10, this.ClientSize.Height - ammo.Height);
            ammo.Tag      = "ammo";

            this.Controls.Add(ammo);
            Player.BringToFront();
        }