예제 #1
0
        public override void Create(int x, int y, int h, int l, Form1 g)
        {
            X_spawn = x;
            Y_spawn = y;
            f       = g;
            PictureBox L_obj = new PictureBox();

            L_obj.Size      = new System.Drawing.Size(h, l);
            L_obj.Left      = x;
            L_obj.Top       = y;
            L_obj.BackColor = System.Drawing.Color.Blue;
            Tnaks.Add(L_obj);
            f.Controls.Add(Tnaks[0]);
        }
예제 #2
0
        public void Create(int x, int y, int h, int l, Form1 g, int index)
        {
            focus   = 1; // направление танка
            d       = new Tank();
            X_spawn = x;
            Y_spawn = y;
            f       = g;
            n       = index;
            PictureBox L_obj = new PictureBox();

            L_obj.Size            = new System.Drawing.Size(h, l);
            L_obj.Left            = x;
            L_obj.Top             = y;
            L_obj.BackgroundImage = Image.FromFile("Enemy_D.png");
            Tnaks.Add(L_obj);
            f.Controls.Add(Tnaks[index]);
        }