基本信息
源码名称:Flappy Bird 像素鸟精简版
源码大小:1.73M
文件格式:.zip
开发语言:C#
更新时间:2017-03-11
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
C#方法实现像素鸟,自动记录游戏成绩
public void InitialGame()
{
bird = new Bird(70, 160, 0);
Pup = new Pipe(300, -650, PipeDir.Up);
Pup.Height = 830 - 650;
Pdown = new Pipe(300, 320, PipeDir.Down);
Pdown.Height = 320;
if (File.Exists(recordFilePath))
{
using (StreamReader sr = new StreamReader(recordFilePath))
{
max = Convert.ToInt32(sr.ReadLine());
}
}
else max = 0;
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
if (!start) //游戏未开始
{
e.Graphics.DrawImage(startimg, 118, 180);
}
else //游戏开始
{
Pup.Draw(e.Graphics);
Pdown.Draw(e.Graphics);
bird.Draw(e.Graphics);
}
}
C#方法实现像素鸟,自动记录游戏成绩
public void InitialGame()
{
bird = new Bird(70, 160, 0);
Pup = new Pipe(300, -650, PipeDir.Up);
Pup.Height = 830 - 650;
Pdown = new Pipe(300, 320, PipeDir.Down);
Pdown.Height = 320;
if (File.Exists(recordFilePath))
{
using (StreamReader sr = new StreamReader(recordFilePath))
{
max = Convert.ToInt32(sr.ReadLine());
}
}
else max = 0;
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
if (!start) //游戏未开始
{
e.Graphics.DrawImage(startimg, 118, 180);
}
else //游戏开始
{
Pup.Draw(e.Graphics);
Pdown.Draw(e.Graphics);
bird.Draw(e.Graphics);
}
}