嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 1 元微信扫码支付:1 元
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
飞翔的小鸟
private void timer_CreatePic_Tick(object sender, EventArgs e)
{
int width = RandomSpace(100, 150); //随机障碍物宽度
int space = RandomSpace(50, 80);//可通过空间高度
int topLenth = RandomSpace(160, panel1.Height - 160); //上面障碍物高度
Color clor = RanDomColor();
PictureBox pictop = new PictureBox();
pictop.Name = "Img_top" new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds();
pictop.BackColor = clor;
pictop.Width = width;
pictop.Location = new Point(panel1.Location.X panel1.Width, panel1.Location.Y);
pictop.Size = new Size(width, topLenth);
PictureBox picdown = new PictureBox();
picdown.Name = "Img_down" new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds();
picdown.BackColor = clor;
picdown.Width = width;
picdown.Location = new Point(panel1.Location.X panel1.Width, panel1.Location.Y topLenth width);
picdown.Size = new Size(width, panel1.Height - topLenth - width);
panel1.Controls.Add(pictop);
panel1.Controls.Add(picdown);
}