Ejemplo n.º 1
0
    public void moveEnemiesLeft(object sender, EventArgs e)
    {
        Random r   = new Random();
        EList  ens = es[this.put];

        for (int i = 0; i < ens.Count; i++)
        {
            ens[i].moveLeft();
            int v = r.Next(6);
            if (v == 3)
            {
                ens[i].moveUp();
            }
            else if (v == 4)
            {
                ens[i].moveDown();
            }
            g.DrawImage(enmy, ens[i].x, ens[i].y, 31, 31);
            int xr = r.Next(50) * -1 + 30;
            int yr = r.Next(50) - r.Next(50);
            int y  = r.Next(10);
            if (y == 0)
            {
                Lead lead = new Lead(scroller, g, ens[i].x, ens[i].y, soldier, mylead);
                lead.ShootLittle();
                lead.HurtLots();
                lead.DrawBig();
                lead.exe(lead.randomizeShiets(lead.Sheut(), xr, yr));
            }
        }
    }