Example #1
0
        public void moveTo(LoEC loEC)
        {
            pictureBox.BringToFront();
            int xSpeed = 10;

            while (x + width <= loEC.x)
            {
                pictureBox.Left = x + xSpeed;
                x = x + xSpeed;
                Thread.Sleep(10);
            }

            while (x >= originalX)
            {
                pictureBox.Left = x - xSpeed;
                x = x - xSpeed;
                Thread.Sleep(10);
            }
            x = originalX;
            pictureBox.Left = originalX;
            int random = new Random().Next(140, 160);

            loEC.HP            -= random;
            loEC.HPLabel.Width -= (int)(random * 1.0 / 1000 * 256);
            loEC.HPLabel.Left  += (int)(random * 1.0 / 1000 * 256);
        }
Example #2
0
 public Form1()
 {
     InitializeComponent();
     holySpirit = new HolySpirit(HolySpiritBox, HPLeft);
     loEC       = new LoEC(LoECBox, HPRight);
 }