Exemple #1
0
        public void agregarExplosion(Terrorista d)
        {
            explosion.Image     = Properties.Resources.bum2;
            explosion.Location  = new Point(d.Location.X, d.Location.Y);
            explosion.Size      = new Size(d.Width, d.Height);
            explosion.SizeMode  = PictureBoxSizeMode.StretchImage;
            explosion.BackColor = Color.Transparent;
            explosion.BringToFront();
            this.Controls.Add(explosion);

            this.timer.Interval = 500;

            this.timer.Start();
            this.timer.Tick += new System.EventHandler(timer_explosion);
        }
Exemple #2
0
        public void agregarTerrorista(Point pos, int velocidad, double factorTam, Size size, int i)
        {
            Terrorista d = new Terrorista(velocidad);

            this.Controls.Add(d);
            d.Location  = pos;
            d.Size      = size;
            d.SizeMode  = PictureBoxSizeMode.StretchImage;
            d.TabIndex  = 0;
            d.TabStop   = false;
            d.Click    += new System.EventHandler(d.delincuente_Click);
            d.BackColor = Color.Transparent;
            d.BringToFront();
            d.setPosicionInicial(pos.Y);
            d.Index  = i;
            d.Click += new EventHandler(this.clicker);
            terroristas.Add(d);
        }