有朋友说只看代码不爽,所以特上传EXE和一张截图,哈哈。
执行文件下载链接:http://pan.baidu.com/s/1pJ5Hg5X http://download.csdn.net/detail/unskytoo/8366523
剩下部分代码,首先是入口,MainForm
public partial class MainForm : Form{public MainForm(){//// The InitializeComponent() call is required for Windows Forms designer support.//InitializeComponent();//// TODO: Add constructor code after the InitializeComponent() call.//this.ClientSize = new Size(Config.ScreenWidth, Config.ScreenHeight);this.StartPosition = FormStartPosition.CenterScreen;this.pictureBox1.Location = new Point(0, 0);this.pictureBox1.ClientSize = new Size(Config.ScreenWidth, Config.ScreenHeight);this.DoubleBuffered = true;}private Game.GameScene scene;private void RenderOver(object sender){this.pictureBox1.Image = scene.Surface;this.Text = "FPS:" + scene.FPS.ToString();}void MainFormLoad(object sender, EventArgs e){Resources.Load("Bullets.png");Resources.Load("Background.bmp");Resources.Load("Res.bmp");Resources.Load("BulletsAll.png");Resources.Load("Player.png");Resources.Load("Bomb.png");Resources.Load("Enemy.png");Resources.Load("Boss1.png");Resources.Load("PlayerPoint.png");Resources.Load("Hp.png");for ( int i = 0; i < Config.BulletTypeCount; i++ ){Resources.Load("Bullet" + i.ToString() + ".png");}Data.BulletSource = Resources.Get("Bullets");Data.BackgroundSource = Resources.Get("Background");Data.BulletAllSource = Resources.Get("BulletsAll");Data.PlayerSource = Resou